From ec20f66eda1776762e571568e502fc26b287213d Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sat, 17 Jul 2021 12:12:12 +1000 Subject: [PATCH] - Duke/RR: Always ensure player's `wantweaponfire` is reset to `-1` after switching weapon. * Fixes #333. --- source/games/duke/src/actors_d.cpp | 1 + source/games/duke/src/actors_r.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/source/games/duke/src/actors_d.cpp b/source/games/duke/src/actors_d.cpp index 912d73225..1a46286b9 100644 --- a/source/games/duke/src/actors_d.cpp +++ b/source/games/duke/src/actors_d.cpp @@ -265,6 +265,7 @@ void addweapon_d(struct player_struct *p, int weapon) #else p->curr_weapon = weapon; #endif + p->wantweaponfire = -1; switch (weapon) { diff --git a/source/games/duke/src/actors_r.cpp b/source/games/duke/src/actors_r.cpp index 05a0c5268..289537872 100644 --- a/source/games/duke/src/actors_r.cpp +++ b/source/games/duke/src/actors_r.cpp @@ -185,6 +185,7 @@ void addweapon_r(struct player_struct* p, int weapon) p->okickback_pic = p->kickback_pic = 0; p->curr_weapon = cw; + p->wantweaponfire = -1; switch (weapon) {