From 63c170150d31e81f09b522cfd47b6de0016bde96 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 15 Mar 2009 08:08:29 +0000 Subject: [PATCH] - Fixed: AWeapon::PickupForAmmo accessed ammo type 1 when checking ammo type2. SVN r1481 (trunk) --- docs/rh-log.txt | 5 ++++- src/g_shared/a_weapons.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 303d034ff..9df8695b4 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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. - Removed CVAR_SERVERINFO flag from compatmode. Since it writes to compatflags, that should be enough. Having that flag set for both of diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index ab6ed7382..8bfe74007 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -171,7 +171,7 @@ bool AWeapon::PickupForAmmo (AWeapon *ownedWeapon) int oldamount1 = 0; int oldamount2 = 0; 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 (AmmoGive2 > 0) gotstuff |= AddExistingAmmo (ownedWeapon->Ammo2, AmmoGive2);