diff --git a/src/g_game.c b/src/g_game.c index 9143f4d0..d1a2d76e 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -903,7 +903,7 @@ void G_BuildTiccmd(ticcmd_t* cmd) // [FG] prev/next weapon keys and buttons next_weapon = 0; - WS_ClearSharedEvent(); + WS_UpdateStateTic(); // [FG] double click acts as "use" if (dclick) diff --git a/src/ws_stuff.c b/src/ws_stuff.c index a9ad8c19..4c34b7dc 100644 --- a/src/ws_stuff.c +++ b/src/ws_stuff.c @@ -331,14 +331,16 @@ boolean WS_HoldOverride(void) } // -// WS_ClearSharedEvent +// WS_UpdateStateTic // -void WS_ClearSharedEvent(void) +void WS_UpdateStateTic(void) { if (shared_event.restored) { ResetSharedEvent(); } + + state.current_slot = NULL; } static void RestoreSharedEvent(void) @@ -425,7 +427,6 @@ static boolean UpdateSelection(const event_t *ev) { state.selected = false; state.input_key = -1; - state.current_slot = NULL; } break; @@ -723,7 +724,6 @@ weapontype_t WS_SlotWeapon(void) const weapontype_t current_weapon = CurrentWeapon(player); const weapontype_t *slot_weapons = state.current_slot->weapons; const int num_weapons = state.current_slot->num_weapons; - state.current_slot = NULL; if (!demo_compatibility) { diff --git a/src/ws_stuff.h b/src/ws_stuff.h index d9f476e2..e45e3b02 100644 --- a/src/ws_stuff.h +++ b/src/ws_stuff.h @@ -45,7 +45,7 @@ void WS_UpdateState(const struct event_s *ev); boolean WS_Override(void); boolean WS_HoldOverride(void); -void WS_ClearSharedEvent(void); +void WS_UpdateStateTic(void); boolean WS_Responder(const struct event_s *ev); boolean WS_SlotSelected(void);