From 40081f8b4411cef04a6b3f5d97337c70eea9c553 Mon Sep 17 00:00:00 2001 From: Noseey Date: Sat, 23 Nov 2024 12:54:23 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"180=C2=B0=20Turn=20only=20once=20per?= =?UTF-8?q?=20button=20press"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ba920ffdab723b5ae7175d528fbca476850b7cbf. --- src/doom/g_game.c | 13 +++---------- src/heretic/g_game.c | 13 +++---------- src/hexen/g_game.c | 13 +++---------- 3 files changed, 9 insertions(+), 30 deletions(-) diff --git a/src/doom/g_game.c b/src/doom/g_game.c index 9a8af8854..66a81e6ff 100644 --- a/src/doom/g_game.c +++ b/src/doom/g_game.c @@ -445,7 +445,6 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic) int look; player_t *const player = &players[consoleplayer]; static char playermessage[48]; - static boolean keyrevstate = false; // [crispy] // [crispy] For fast polling. G_PrepTiccmd(); @@ -507,15 +506,9 @@ void G_BuildTiccmd (ticcmd_t* cmd, int maketic) // [crispy] add quick 180° reverse if (gamekeydown[key_reverse] || mousebuttons[mousebreverse]) { - if(!keyrevstate) - { - angle += ANG180 >> FRACBITS; - keyrevstate = true; - } - } - else - { - keyrevstate = false; + angle += ANG180 >> FRACBITS; + gamekeydown[key_reverse] = false; + mousebuttons[mousebreverse] = false; } // [crispy] toggle "always run" diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c index c42fa3c33..14f8c6794 100644 --- a/src/heretic/g_game.c +++ b/src/heretic/g_game.c @@ -405,7 +405,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, int maketic) static unsigned int mbmlookctrl = 0; // [crispy] static unsigned int kbdlookctrl = 0; // [crispy] - static boolean keyrevstate = false; // [crispy] // haleyjd: removed externdriver crap @@ -467,15 +466,9 @@ void G_BuildTiccmd(ticcmd_t *cmd, int maketic) // [crispy] add quick 180° reverse if (gamekeydown[key_reverse] || mousebuttons[mousebreverse]) { - if(!keyrevstate) - { - angle += ANG180 >> FRACBITS; - keyrevstate = true; - } - } - else - { - keyrevstate = false; + angle += ANG180 >> FRACBITS; + gamekeydown[key_reverse] = false; + mousebuttons[mousebreverse] = false; } // [crispy] toggle "always run" diff --git a/src/hexen/g_game.c b/src/hexen/g_game.c index fa8b03226..8d59e4df0 100644 --- a/src/hexen/g_game.c +++ b/src/hexen/g_game.c @@ -299,7 +299,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, int maketic) static unsigned int mbmlookctrl = 0; // [crispy] static unsigned int kbdlookctrl = 0; // [crispy] - static boolean keyrevstate = false; // [crispy] // haleyjd: removed externdriver crap @@ -365,15 +364,9 @@ void G_BuildTiccmd(ticcmd_t *cmd, int maketic) // [crispy] add quick 180° reverse if (gamekeydown[key_reverse] || mousebuttons[mousebreverse]) { - if(!keyrevstate) - { - angle += ANG180 >> FRACBITS; - keyrevstate = true; - } - } - else - { - keyrevstate = false; + angle += ANG180 >> FRACBITS; + gamekeydown[key_reverse] = false; + mousebuttons[mousebreverse] = false; } // [crispy] toggle "always run"