- Fixed: AWeapon::PickupForAmmo accessed ammo type 1 when checking ammo type2.

SVN r1481 (trunk)
This commit is contained in:
Christoph Oelckers 2009-03-15 08:08:29 +00:00
parent 6236074684
commit 63c170150d
2 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,7 @@
March 14, 2009 March 15, 2009 (Changes by Graf Zahl)
- Fixed: AWeapon::PickupForAmmo accessed ammo type 1 when checking ammo type2.
March 14, 2009
- Changed Linux default for fullscreen to false. - Changed Linux default for fullscreen to false.
- Removed CVAR_SERVERINFO flag from compatmode. Since it writes to - Removed CVAR_SERVERINFO flag from compatmode. Since it writes to
compatflags, that should be enough. Having that flag set for both of compatflags, that should be enough. Having that flag set for both of

View file

@ -171,7 +171,7 @@ bool AWeapon::PickupForAmmo (AWeapon *ownedWeapon)
int oldamount1 = 0; int oldamount1 = 0;
int oldamount2 = 0; int oldamount2 = 0;
if (ownedWeapon->Ammo1 != NULL) oldamount1 = ownedWeapon->Ammo1->Amount; if (ownedWeapon->Ammo1 != NULL) oldamount1 = ownedWeapon->Ammo1->Amount;
if (ownedWeapon->Ammo2 != NULL) oldamount2 = ownedWeapon->Ammo1->Amount; if (ownedWeapon->Ammo2 != NULL) oldamount2 = ownedWeapon->Ammo2->Amount;
if (AmmoGive1 > 0) gotstuff = AddExistingAmmo (ownedWeapon->Ammo1, AmmoGive1); if (AmmoGive1 > 0) gotstuff = AddExistingAmmo (ownedWeapon->Ammo1, AmmoGive1);
if (AmmoGive2 > 0) gotstuff |= AddExistingAmmo (ownedWeapon->Ammo2, AmmoGive2); if (AmmoGive2 > 0) gotstuff |= AddExistingAmmo (ownedWeapon->Ammo2, AmmoGive2);