summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Haley2014-10-24 00:52:10 -0500
committerJames Haley2014-10-24 00:52:10 -0500
commit2363b1366ed227b54f9815a6ea4a0915843ca0c7 (patch)
tree5a48b964ab11013e17c525e28559b5cd31fedc98
parentd61a8018fd43137342a587b6e05a487e8c3a566b (diff)
downloadchocolate-doom-2363b1366ed227b54f9815a6ea4a0915843ca0c7.tar.gz
chocolate-doom-2363b1366ed227b54f9815a6ea4a0915843ca0c7.tar.bz2
chocolate-doom-2363b1366ed227b54f9815a6ea4a0915843ca0c7.zip
Upstream fix 1
Same fix applied to wp_torpedo selection in P_PlayerThink must also be applied to weapon rotation code in g_game
-rw-r--r--src/strife/g_game.c4
1 files changed, 3 insertions, 1 deletions
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;
}