foxygit / doom Log in
commit 2363b1366ed227b54f9815a6ea4a0915843ca0c7
Author:     James Haley <haleyjd@hotmail.com>
AuthorDate: Fri Oct 24 00:52:10 2014 -0500
Commit:     James Haley <haleyjd@hotmail.com>
CommitDate: Fri Oct 24 00:52:10 2014 -0500

    Upstream fix 1

    Same fix applied to wp_torpedo selection in P_PlayerThink must also be
    applied to weapon rotation code in g_game
---
 src/strife/g_game.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/strife/g_game.c b/src/strife/g_game.c
index a2194747..8d074a1f 100644
--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -270,8 +270,10 @@ static boolean WeaponSelectable(weapontype_t weapon)
     // Special rules for switching to alternate versions of weapons.
     // These must match the weapon-switching rules in P_PlayerThink()

+    // haleyjd 20141024: same fix here as in P_PlayerThink for torpedo.
+
     if (weapon == wp_torpedo
-     && player->ammo[weaponinfo[am_cell].ammo] < 30)
+     && player->ammo[weaponinfo[wp_torpedo].ammo] < 30)
     {
         return false;
     }