Reverted optimization code which prevented 40mm grenades to load if <attachment> tag is not set in mod (by Shadooow).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9003 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Sevenfm
2021-05-05 08:08:37 +00:00
parent b7cc3bbcf8
commit e4f12a68aa
+4 -4
View File
@@ -2392,8 +2392,8 @@ BOOLEAN ValidItemAttachmentSlot( OBJECTTYPE * pObj, UINT16 usAttachment, BOOLEAN
return FALSE; return FALSE;
// shadooow: efficiency check, we are passing all kinds of items into this function that are not neccessary attachments at all // shadooow: efficiency check, we are passing all kinds of items into this function that are not neccessary attachments at all
if (!Item[usAttachment].attachment && !Item[usAttachment].hiddenaddon) //if (!Item[usAttachment].attachment && !Item[usAttachment].hiddenaddon)
return FALSE; //return FALSE;
//It's possible we could get here without being sent the usAttachmentSlotIndexVector parameter //It's possible we could get here without being sent the usAttachmentSlotIndexVector parameter
if(usAttachmentSlotIndexVector.empty()) if(usAttachmentSlotIndexVector.empty())
@@ -2688,8 +2688,8 @@ BOOLEAN TwoHandedItem( UINT16 usItem )
BOOLEAN ValidLaunchable( UINT16 usLaunchable, UINT16 usItem ) BOOLEAN ValidLaunchable( UINT16 usLaunchable, UINT16 usItem )
{ {
// shadooow: efficiency check, we are passing all kinds of items into this function that are not neccessary attachments at all // shadooow: efficiency check, we are passing all kinds of items into this function that are not neccessary attachments at all
if (!Item[usLaunchable].attachment && !Item[usLaunchable].hiddenaddon) //if (!Item[usLaunchable].attachment && !Item[usLaunchable].hiddenaddon)
return FALSE; //return FALSE;
INT32 iLoop = 0; INT32 iLoop = 0;
// Flugente: as this would cause launchers to happily launch attachments around the landscape, we really have to check the list of launchables // Flugente: as this would cause launchers to happily launch attachments around the landscape, we really have to check the list of launchables