Skip to content

Commit

Permalink
Prevent imideate "use" repeating
Browse files Browse the repository at this point in the history
As mentionen in #93 (comment)
  • Loading branch information
JNechaevsky committed Feb 17, 2024
1 parent 03bb0fa commit fa8b660
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/doom/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -2188,6 +2188,13 @@ void G_DoLoadGame (void)
// do not consider it for reload
if (players[consoleplayer].health <= 0)
G_ClearSavename();

// [JN] If "On death action" is set to "last save",
// then prevent holded "use" button to work for next few tics.
// This fixes imidiate pressing on wall upon reloading
// a save game, if "use" button is kept pressed.
if (singleplayer && gp_death_use_action == 1)
players[consoleplayer].usedown = true;
}


Expand Down
7 changes: 7 additions & 0 deletions src/heretic/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -2264,6 +2264,13 @@ void G_DoLoadGame(void)
// do not consider it for reload
if (players[consoleplayer].health <= 0)
G_ClearSavename();

// [JN] If "On death action" is set to "last save",
// then prevent holded "use" button to work for next few tics.
// This fixes imidiate pressing on wall upon reloading
// a save game, if "use" button is kept pressed.
if (singleplayer && gp_death_use_action == 1)
players[consoleplayer].usedown = true;
}


Expand Down

0 comments on commit fa8b660

Please sign in to comment.