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:
Flugente
2021-07-24 19:15:18 +00:00
parent 102ee32232
commit ed82841e3c
7 changed files with 54 additions and 41 deletions
+3 -3
View File
@@ -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;