summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Haley2014-09-24 20:22:57 -0500
committerJames Haley2014-09-24 20:22:57 -0500
commita0a4303a99c8dda72cbe3ff00f26157c2a639fcd (patch)
tree4d6260e57546474683ee6136b3f29ccf9b148550
parent6f8bed05ab5bb9c403ce4d60ce3f85869fca8c49 (diff)
downloadchocolate-doom-a0a4303a99c8dda72cbe3ff00f26157c2a639fcd.tar.gz
chocolate-doom-a0a4303a99c8dda72cbe3ff00f26157c2a639fcd.tar.bz2
chocolate-doom-a0a4303a99c8dda72cbe3ff00f26157c2a639fcd.zip
Upstream fix to torpedo weapon changing
Use of the wrong enum value as an index into weaponinfo left the torpedo's selectability accidentally relying on you having 30 or more rockets instead of cells. Verified against binary as a choco error.
-rw-r--r--src/strife/p_user.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/strife/p_user.c b/src/strife/p_user.c
index 78b8df03..bf082e99 100644
--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -457,7 +457,9 @@ void P_PlayerThink (player_t* player)
{
if(player->weaponowned[wp_torpedo] && player->readyweapon == wp_mauler)
{
- if(player->ammo[weaponinfo[am_cell].ammo] >= 30)
+ // haleyjd 20140924: bug fix - using wrong enum value am_cell
+ // caused this to check the missile launcher for rocket ammo
+ if(player->ammo[weaponinfo[wp_torpedo].ammo] >= 30)
newweapon = wp_torpedo;
}
}