mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
1. Bugfix - ammo crates will no longer create boxes instead of mags
2. Bugfix - ammo boxes of 100 rounds will now correctly generate C-Mags 3. Bugfix - reduced NAS looping while highlighting items in map screen git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5297 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2838,12 +2838,16 @@ BOOLEAN HandleCompatibleAmmoUIForMapScreen( SOLDIERTYPE *pSoldier, INT32 bInvPos
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( (UsingNewAttachmentSystem()==false && ValidAttachment( pObject->usItem, pTestObject )) ||
|
||||
(UsingNewAttachmentSystem()==false && ValidAttachment( pTestObject->usItem, pObject )) ||
|
||||
(UsingNewAttachmentSystem()==true && ValidItemAttachmentSlot(pTestObject, pObject->usItem, FALSE, FALSE, 0, cnt)) ||
|
||||
(UsingNewAttachmentSystem()==true && ValidItemAttachmentSlot(pObject, pTestObject->usItem, FALSE, FALSE, 0, cnt)) ||
|
||||
if ( ValidAttachment( pObject->usItem, pTestObject ) ||
|
||||
ValidAttachment( pTestObject->usItem, pObject ) ||
|
||||
ValidLaunchable( pTestObject->usItem, pObject->usItem ) ||
|
||||
ValidLaunchable( pObject->usItem, pTestObject->usItem ) )
|
||||
//if ( (UsingNewAttachmentSystem()==false && ValidAttachment( pObject->usItem, pTestObject )) ||
|
||||
// (UsingNewAttachmentSystem()==false && ValidAttachment( pTestObject->usItem, pObject )) ||
|
||||
// (UsingNewAttachmentSystem()==true && ValidItemAttachmentSlot(pTestObject, pObject->usItem, FALSE, FALSE, 0, cnt)) ||
|
||||
// (UsingNewAttachmentSystem()==true && ValidItemAttachmentSlot(pObject, pTestObject->usItem, FALSE, FALSE, 0, cnt)) ||
|
||||
// ValidLaunchable( pTestObject->usItem, pObject->usItem ) ||
|
||||
// ValidLaunchable( pObject->usItem, pTestObject->usItem ) )
|
||||
{
|
||||
fFoundAttachment = TRUE;
|
||||
|
||||
@@ -12151,7 +12155,7 @@ void ItemDescTransformRegionCallback( MOUSE_REGION *pRegion, INT32 reason )
|
||||
// not an ammo crate itself...
|
||||
if ( Magazine[Item[x].ubClassIndex].ubCalibre == Magazine[Item[gpItemDescObject->usItem].ubClassIndex].ubCalibre &&
|
||||
Magazine[Item[x].ubClassIndex].ubAmmoType == Magazine[Item[gpItemDescObject->usItem].ubClassIndex].ubAmmoType &&
|
||||
Magazine[Item[x].ubClassIndex].ubMagSize < Magazine[Item[gpItemDescObject->usItem].ubClassIndex].ubMagSize &&
|
||||
Magazine[Item[x].ubClassIndex].ubMagSize <= Magazine[Item[gpItemDescObject->usItem].ubClassIndex].ubMagSize &&
|
||||
Magazine[Item[x].ubClassIndex].ubMagType < AMMO_BOX )
|
||||
{
|
||||
UINT16 usMagSize = Magazine[Item[x].ubClassIndex].ubMagSize;
|
||||
|
||||
+1
-1
@@ -6014,7 +6014,7 @@ BOOLEAN PlaceObject( SOLDIERTYPE * pSoldier, INT8 bPos, OBJECTTYPE * pObj )
|
||||
{
|
||||
if(Item[loop].usItemClass == IC_AMMO)
|
||||
{
|
||||
if(Magazine[Item[loop].ubClassIndex].ubCalibre == Weapon[pObjUsed->usItem].ubCalibre && Magazine[Item[loop].ubClassIndex].ubAmmoType == Magazine[Item[pObj->usItem].ubClassIndex].ubAmmoType && Magazine[Item[loop].ubClassIndex].ubMagSize == GetMagSize(pObjUsed))
|
||||
if(Magazine[Item[loop].ubClassIndex].ubCalibre == Weapon[pObjUsed->usItem].ubCalibre && Magazine[Item[loop].ubClassIndex].ubAmmoType == Magazine[Item[pObj->usItem].ubClassIndex].ubAmmoType && Magazine[Item[loop].ubClassIndex].ubMagSize == GetMagSize(pObjUsed) && Magazine[Item[loop].ubClassIndex].ubMagType < AMMO_BOX )
|
||||
newItem = loop;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user