mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix for AI seeking climb point in toxic gas
Fix for civilians trying to climb the roof to seek noise Fix for punching and stabbing Transparent change: Gave names to anonymous structs in OBJECTTYPE git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1225 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+6
-6
@@ -1626,7 +1626,7 @@ BOOLEAN EnoughAmmo( SOLDIERTYPE *pSoldier, BOOLEAN fDisplay, INT8 bInvPos )
|
||||
}
|
||||
else if (Item[ pSoldier->inv[ bInvPos ].usItem ].usItemClass == IC_GUN)
|
||||
{
|
||||
if ( pSoldier->inv[ bInvPos ].ubGunShotsLeft == 0 )
|
||||
if ( pSoldier->inv[ bInvPos ].ItemData.Gun.ubGunShotsLeft == 0 )
|
||||
{
|
||||
if ( fDisplay )
|
||||
{
|
||||
@@ -1638,7 +1638,7 @@ BOOLEAN EnoughAmmo( SOLDIERTYPE *pSoldier, BOOLEAN fDisplay, INT8 bInvPos )
|
||||
//<SB> manual recharge
|
||||
if( pSoldier->bTeam == OUR_TEAM )
|
||||
{
|
||||
if ( !( pSoldier->inv[ bInvPos ].ubGunState & GS_CARTRIDGE_IN_CHAMBER ) )
|
||||
if ( !( pSoldier->inv[ bInvPos ].ItemData.Gun.ubGunState & GS_CARTRIDGE_IN_CHAMBER ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
@@ -1677,11 +1677,11 @@ void DeductAmmo( SOLDIERTYPE *pSoldier, INT8 bInvPos )
|
||||
if ( pSoldier->usAttackingWeapon == pObj->usItem)
|
||||
{
|
||||
// OK, let's see, don't overrun...
|
||||
if ( pObj->ubGunShotsLeft != 0 )
|
||||
if ( pObj->ItemData.Gun.ubGunShotsLeft != 0 )
|
||||
{
|
||||
pObj->ubGunShotsLeft--;
|
||||
pObj->ItemData.Gun.ubGunShotsLeft--;
|
||||
//Pulmu: Update weight after firing gun to account for bullets fired
|
||||
if( gGameExternalOptions.fAmmoDynamicWeight == TRUE && pObj->ubGunShotsLeft > 0)
|
||||
if( gGameExternalOptions.fAmmoDynamicWeight == TRUE && pObj->ItemData.Gun.ubGunShotsLeft > 0)
|
||||
{
|
||||
pSoldier->inv[HANDPOS].ubWeight = CalculateObjectWeight( &(pSoldier->inv[HANDPOS]));
|
||||
}
|
||||
@@ -1823,7 +1823,7 @@ INT8 GetAPsToAutoReload( SOLDIERTYPE * pSoldier )
|
||||
pObj = &(pSoldier->inv[HANDPOS]);
|
||||
|
||||
//<SB> manual recharge
|
||||
if (pObj->ubGunShotsLeft && !(pObj->ubGunState & GS_CARTRIDGE_IN_CHAMBER) )
|
||||
if (pObj->ItemData.Gun.ubGunShotsLeft && !(pObj->ItemData.Gun.ubGunState & GS_CARTRIDGE_IN_CHAMBER) )
|
||||
{
|
||||
return Weapon[Item[(pObj)->usItem].ubClassIndex].APsToReloadManually;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user