-in previous version committed wrong files :-}

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6571 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Kriplo
2013-11-09 20:55:11 +00:00
parent 4104fbb248
commit b997811a5d
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -2860,7 +2860,7 @@ void HandleAnyMercInSquadHasCompatibleStuff( UINT8 ubSquad, OBJECTTYPE *pObject,
} }
BOOLEAN IsMutuallyValidAttachmentOrLaunchable(UINT16 usAttItem, UINT16 usItem)//dnl??? ch76 091113 BOOLEAN IsMutuallyValidAttachmentOrLaunchable(UINT16 usAttItem, UINT16 usItem)//dnl ch76 091113
{ {
UINT32 uiLoop = 0; UINT32 uiLoop = 0;
while(Attachment[uiLoop][0] | Launchable[uiLoop][0]) while(Attachment[uiLoop][0] | Launchable[uiLoop][0])
@@ -2958,7 +2958,7 @@ BOOLEAN HandleCompatibleAmmoUIForMapScreen( SOLDIERTYPE *pSoldier, INT32 bInvPos
// don't consider for UI purposes // don't consider for UI purposes
continue; continue;
} }
#if 0//dnl??? ch76 091113 #if 0//dnl ch76 091113
if ( ValidAttachment( pObject->usItem, pTestObject ) || if ( ValidAttachment( pObject->usItem, pTestObject ) ||
ValidAttachment( pTestObject->usItem, pObject ) || ValidAttachment( pTestObject->usItem, pObject ) ||
ValidLaunchable( pTestObject->usItem, pObject->usItem ) || ValidLaunchable( pTestObject->usItem, pObject->usItem ) ||
@@ -3068,7 +3068,7 @@ BOOLEAN HandleCompatibleAmmoUIForMapInventory( SOLDIERTYPE *pSoldier, INT32 bInv
// don't consider for UI purposes // don't consider for UI purposes
continue; continue;
} }
#if 0//dnl??? ch76 091113 #if 0//dnl ch76 091113
if ( ValidAttachment( pObject->usItem, pTestObject ) || if ( ValidAttachment( pObject->usItem, pTestObject ) ||
ValidAttachment( pTestObject->usItem, pObject ) || ValidAttachment( pTestObject->usItem, pObject ) ||
ValidLaunchable( pTestObject->usItem, pObject->usItem ) || ValidLaunchable( pTestObject->usItem, pObject->usItem ) ||
@@ -5522,7 +5522,7 @@ void UpdateAttachmentTooltips(OBJECTTYPE *pObject, UINT8 ubStatusIndex)
std::vector<UINT16> usAttachmentSlotIndexVector = GetItemSlots(pObject); std::vector<UINT16> usAttachmentSlotIndexVector = GetItemSlots(pObject);
UINT64 point = GetAvailableAttachmentPoint(pObject, 0); //Madd: Common Attachment Framework UINT64 point = GetAvailableAttachmentPoint(pObject, 0); //Madd: Common Attachment Framework
//dnl??? ch76 081113 //dnl ch76 081113
std::vector<UINT16> attachedList; std::vector<UINT16> attachedList;
for(UINT8 x=0; x<(*pObject)[ubStatusIndex]->attachments.size(); x++)// attached item list rather create here then inside loop to gain performance for(UINT8 x=0; x<(*pObject)[ubStatusIndex]->attachments.size(); x++)// attached item list rather create here then inside loop to gain performance
{ {
@@ -5625,7 +5625,7 @@ void UpdateAttachmentTooltips(OBJECTTYPE *pObject, UINT8 ubStatusIndex)
} }
else else
{ //search for attachments/launchables made valid by other attachments { //search for attachments/launchables made valid by other attachments
#if 0//dnl??? ch76 081113 #if 0//dnl ch76 081113
for(UINT8 x=0; x<(*pObject)[ubStatusIndex]->attachments.size(); x++) for(UINT8 x=0; x<(*pObject)[ubStatusIndex]->attachments.size(); x++)
{ {
OBJECTTYPE* pAttachment2 = (*pObject)[ubStatusIndex]->GetAttachmentAtIndex(x); OBJECTTYPE* pAttachment2 = (*pObject)[ubStatusIndex]->GetAttachmentAtIndex(x);
+1 -1
View File
@@ -2324,7 +2324,7 @@ BOOLEAN ValidItemAttachmentSlot( OBJECTTYPE * pObj, UINT16 usAttachment, BOOLEAN
//Do we want to check all attachment slots or just the one in slotcount? //Do we want to check all attachment slots or just the one in slotcount?
if(slotCount == -1){ if(slotCount == -1){
//Loop through slots //Loop through slots
UINT32 uiSlots = min((*pObj)[subObject]->attachments.size(), usAttachmentSlotIndexVector.size());//dnl??? ch76 091113 ugly fix as AK74 after attach/remove GL will have more attachments then usAttachmentSlotIndexVector which lead to CTD UINT32 uiSlots = min((*pObj)[subObject]->attachments.size(), usAttachmentSlotIndexVector.size());//dnl ch76 091113 ugly fix as AK74 after attach/remove GL will have more attachments then usAttachmentSlotIndexVector which lead to CTD
for(UINT8 curSlot = 0; curSlot < uiSlots && !foundValidAttachment; curSlot++){ for(UINT8 curSlot = 0; curSlot < uiSlots && !foundValidAttachment; curSlot++){
//Any attachment that is already in this slot will go here. //Any attachment that is already in this slot will go here.
OBJECTTYPE * pAttachment; OBJECTTYPE * pAttachment;