Skip to content

Commit

Permalink
weapon.c: Cancel reloading if player switches tools
Browse files Browse the repository at this point in the history
This cancels weapon reloading if the player switches tools,
this is the behavior that can be observed in the VOXLAP server.exe
and in SpadesX.

Closes xtreme8000#174
  • Loading branch information
utf-4096 committed Mar 8, 2023
1 parent 0070b53 commit 6bcdfdb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/weapon.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ void weapon_update() {
players[local_player_id].item_disabled = window_time();
players[local_player_id].items_show_start = window_time();
players[local_player_id].items_show = 1;
} else {
weapon_reload_inprogress = 0;
}
} else {
if(screen_current == SCREEN_NONE && window_time() - players[local_player_id].item_disabled >= 0.5F) {
Expand Down

0 comments on commit 6bcdfdb

Please sign in to comment.