diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 303d034ff8..9df8695b4f 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 ab6ed73825..8bfe740073 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);