mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
- new feature: manual reload
- update readme git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@177 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1583,6 +1583,16 @@ BOOLEAN EnoughAmmo( SOLDIERTYPE *pSoldier, BOOLEAN fDisplay, INT8 bInvPos )
|
||||
}
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
//<SB> manual recharge
|
||||
if( pSoldier->bTeam == OUR_TEAM )
|
||||
{
|
||||
if ( !( pSoldier->inv[ bInvPos ].ubGunState & GS_CARTRIDGE_IN_CHAMBER ) )
|
||||
{
|
||||
return( FALSE );
|
||||
}
|
||||
}
|
||||
//</SB>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1756,6 +1766,13 @@ INT8 GetAPsToAutoReload( SOLDIERTYPE * pSoldier )
|
||||
CHECKF( pSoldier );
|
||||
pObj = &(pSoldier->inv[HANDPOS]);
|
||||
|
||||
//<SB> manual recharge
|
||||
if (pObj->ubGunShotsLeft && !(pObj->ubGunState & GS_CARTRIDGE_IN_CHAMBER) )
|
||||
{
|
||||
return Weapon[Item[(pObj)->usItem].ubClassIndex].APsToReloadManually;
|
||||
}
|
||||
//</SB>
|
||||
|
||||
if (Item[pObj->usItem].usItemClass == IC_GUN || Item[pObj->usItem].usItemClass == IC_LAUNCHER)
|
||||
{
|
||||
bSlot = FindAmmoToReload( pSoldier, HANDPOS, NO_SLOT );
|
||||
|
||||
Reference in New Issue
Block a user