mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Improved r8460 fix: also check for incorrect ammo item.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8917 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+3
-2
@@ -3424,7 +3424,8 @@ BOOLEAN ReloadGun( SOLDIERTYPE * pSoldier, OBJECTTYPE * pGun, OBJECTTYPE * pAmmo
|
||||
CreateAmmo((*pGun)[subObject]->data.gun.usGunAmmoItem, &gTempObject, (*pGun)[subObject]->data.gun.ubGunShotsLeft);
|
||||
|
||||
// Flugente: safety check: if object is broken, wipe it
|
||||
if ( gTempObject.usItem == NOTHING )
|
||||
// sevenfm: also check for incorrect ammo item
|
||||
if (gTempObject.usItem == NOTHING || !(Item[gTempObject.usItem].usItemClass & IC_AMMO))
|
||||
gTempObject.initialize( );
|
||||
|
||||
if (fSameMagazineSize)
|
||||
@@ -3533,7 +3534,7 @@ BOOLEAN ReloadGun( SOLDIERTYPE * pSoldier, OBJECTTYPE * pGun, OBJECTTYPE * pAmmo
|
||||
}
|
||||
}
|
||||
|
||||
//CHRIS: This should reset the number of bullest moved to what we can actually afford when loading loose rounds
|
||||
//CHRIS: This should reset the number of bullets moved to what we can actually afford when loading loose rounds
|
||||
if(Weapon[pGun->usItem].swapClips == 0 && (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT))
|
||||
{
|
||||
if(fEnoughAPs)
|
||||
|
||||
Reference in New Issue
Block a user