mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Fix: when using two guns, both are reloaded on the reload cursor prompt, even if one of them still has ammo. This has been changed so that now only empty guns get reloaded
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9146 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1248,7 +1248,7 @@ UINT8 HandleNonActivatedTargetCursor( SOLDIERTYPE *pSoldier, INT32 usMapPos , BO
|
||||
|
||||
//CHRISL: We need to only check the second hand if the weapon in the second hand is onehanded
|
||||
// Check for enough ammo...
|
||||
if ( !EnoughAmmo( pSoldier, FALSE, HANDPOS ) || (pSoldier->IsValidSecondHandShotForReloadingPurposes( ) && !EnoughAmmo( pSoldier, FALSE, SECONDHANDPOS) && !Item[pSoldier->inv[SECONDHANDPOS].usItem].twohanded ) )
|
||||
if ( !EnoughAmmo( pSoldier, FALSE, HANDPOS ) || (pSoldier->IsValidSecondHandShotForReloadingPurposes( ) && !Item[pSoldier->inv[SECONDHANDPOS].usItem].twohanded && !EnoughAmmo( pSoldier, FALSE, SECONDHANDPOS) ) )
|
||||
{
|
||||
// Check if ANY ammo exists.....
|
||||
if ( FindAmmoToReload( pSoldier, HANDPOS, NO_SLOT ) == NO_SLOT )
|
||||
@@ -1259,7 +1259,7 @@ UINT8 HandleNonActivatedTargetCursor( SOLDIERTYPE *pSoldier, INT32 usMapPos , BO
|
||||
else
|
||||
{
|
||||
// Check APs to reload...
|
||||
gsCurrentActionPoints = GetAPsToAutoReload( pSoldier );
|
||||
gsCurrentActionPoints = GetAPsToAutoReload( pSoldier, false );
|
||||
|
||||
gfUIDisplayActionPoints = TRUE;
|
||||
//gUIDisplayActionPointsOffX = 14;
|
||||
@@ -1972,7 +1972,7 @@ UINT8 HandleNonActivatedTossCursor( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEA
|
||||
else
|
||||
{
|
||||
// Check APs to reload...
|
||||
gsCurrentActionPoints = GetAPsToAutoReload( pSoldier );
|
||||
gsCurrentActionPoints = GetAPsToAutoReload( pSoldier, false );
|
||||
|
||||
gfUIDisplayActionPoints = TRUE;
|
||||
//gUIDisplayActionPointsOffX = 14;
|
||||
|
||||
Reference in New Issue
Block a user