shithub: choc

Download patch

ref: 2363b1366ed227b54f9815a6ea4a0915843ca0c7
parent: d61a8018fd43137342a587b6e05a487e8c3a566b
author: James Haley <[email protected]>
date: Thu Oct 23 20:52:10 EDT 2014

Upstream fix 1

Same fix applied to wp_torpedo selection in P_PlayerThink must also be
applied to weapon rotation code in g_game

--- a/src/strife/g_game.c
+++ b/src/strife/g_game.c
@@ -270,8 +270,10 @@
     // 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;
     }