Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Quick Reverse Key to Hexen / Heretic #1240

Merged
merged 3 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/heretic/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,14 @@ void G_BuildTiccmd(ticcmd_t *cmd, int maketic)
lspeed = 2;
}

// [crispy] add quick 180° reverse
if (gamekeydown[key_reverse] || mousebuttons[mousebreverse])
{
angle += ANG180 >> FRACBITS;
gamekeydown[key_reverse] = false;
mousebuttons[mousebreverse] = false;
}

// [crispy] toggle "always run"
if (gamekeydown[key_toggleautorun])
{
Expand Down
8 changes: 8 additions & 0 deletions src/hexen/g_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,14 @@ void G_BuildTiccmd(ticcmd_t *cmd, int maketic)
lspeed = 2; // 5;
}

// [crispy] add quick 180° reverse
if (gamekeydown[key_reverse] || mousebuttons[mousebreverse])
{
angle += ANG180 >> FRACBITS;
gamekeydown[key_reverse] = false;
mousebuttons[mousebreverse] = false;
}

// [crispy] toggle "always run"
if (gamekeydown[key_toggleautorun])
{
Expand Down
4 changes: 2 additions & 2 deletions src/m_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ static default_t doom_defaults_list[] =
CONFIG_VARIABLE_INT(mouseb_mouselook),

//!
// @game doom
// @game doom heretic hexen
//
// Quick 180° reverse.
//
Expand Down Expand Up @@ -2251,7 +2251,7 @@ static default_t extra_defaults_list[] =
CONFIG_VARIABLE_KEY(key_multi_msgplayer8),

//!
// @game doom
// @game doom heretic hexen
// Quick 180° reverse.
//

Expand Down
1 change: 1 addition & 0 deletions src/setup/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ static void ConfigExtraKeys(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused))
AddKeyControl(table, "Strafe Right (alt.)", &key_alt_straferight);
AddKeyControl(table, "Toggle always run", &key_toggleautorun);
AddKeyControl(table, "Toggle vert. mouse", &key_togglenovert);
AddKeyControl(table, "Quick Reverse", &key_reverse);
}

if (gamemission == heretic || gamemission == hexen)
Expand Down
1 change: 1 addition & 0 deletions src/setup/mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ static void ConfigExtraButtons(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused))

if (gamemission == heretic || gamemission == hexen)
{
AddMouseControl(buttons_table, "Quick Reverse", &mousebreverse);
AddMouseControl(buttons_table, "Mouselook", &mousebmouselook);
AddMouseControl(buttons_table, "Inventory left", &mousebinvleft);
AddMouseControl(buttons_table, "Inventory right", &mousebinvright);
Expand Down
Loading