From 0bc9d82f10195d70fa5a6e19636139ed8c027f36 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 2 Jan 2020 17:58:44 -0800 Subject: [PATCH] alwaysdisplayinput shows the input display outside of Record Attack --- src/d_netcmd.c | 2 ++ src/doomstat.h | 1 + src/st_stuff.c | 9 ++++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 750281d5f..23fe066f4 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -199,6 +199,7 @@ static CV_PossibleValue_t matchboxes_cons_t[] = {{0, "Normal"}, {1, "Mystery"}, static CV_PossibleValue_t chances_cons_t[] = {{0, "MIN"}, {9, "MAX"}, {0, NULL}}; static CV_PossibleValue_t pause_cons_t[] = {{0, "Server"}, {1, "All"}, {0, NULL}}; +consvar_t cv_alwaysdisplayinput = {"alwaysdisplayinput", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_showinputjoy = {"showinputjoy", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; #ifdef NETGAME_DEVMODE @@ -702,6 +703,7 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_timetic); CV_RegisterVar(&cv_powerupdisplay); CV_RegisterVar(&cv_itemfinder); + CV_RegisterVar(&cv_alwaysdisplayinput); CV_RegisterVar(&cv_showinputjoy); // time attack ghost options are also saved to config diff --git a/src/doomstat.h b/src/doomstat.h index 3c0b4773a..32cd64ccb 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -586,6 +586,7 @@ extern boolean singletics; extern consvar_t cv_timetic; // display high resolution timer extern consvar_t cv_powerupdisplay; // display powerups extern consvar_t cv_showinputjoy; // display joystick in time attack +extern consvar_t cv_alwaysdisplayinput;/* even outside of time attack! */ extern consvar_t cv_forceskin; // force clients to use the server's skin extern consvar_t cv_downloading; // allow clients to downloading WADs. extern ticcmd_t netcmds[BACKUPTICS][MAXPLAYERS]; diff --git a/src/st_stuff.c b/src/st_stuff.c index 7fa612d12..305270229 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -980,6 +980,9 @@ static void ST_drawInput(void) INT32 x = hudinfo[HUD_LIVES].x, y = hudinfo[HUD_LIVES].y; + if (! modeattacking) + x = 2 * x + 58;/* right side of lives count */ + if (stplyr->powers[pw_carry] == CR_NIGHTSMODE) y -= 16; @@ -2685,10 +2688,14 @@ static void ST_overlayDrawer(void) else if (!(netgame || multiplayer) && cv_powerupdisplay.value == 2) ST_drawPowerupHUD(); // same as it ever was... -#ifdef HAVE_BLUA if (!(netgame || multiplayer) || !hu_showscores) + { + if (! modeattacking && cv_alwaysdisplayinput.value) + ST_drawInput(); +#ifdef HAVE_BLUA LUAh_GameHUD(stplyr); #endif + } // draw level title Tails if (stagetitle && (!WipeInAction) && (!WipeStageTitle))