mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 13:40:45 +00:00
Add toggle for instant retry in Record Attack
This commit is contained in:
parent
ac3e9fc999
commit
b7b1e0b1e5
4 changed files with 9 additions and 3 deletions
|
@ -776,6 +776,8 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_showfocuslost);
|
||||
CV_RegisterVar(&cv_pauseifunfocused);
|
||||
|
||||
CV_RegisterVar(&cv_instantretry);
|
||||
|
||||
// g_input.c
|
||||
CV_RegisterVar(&cv_sideaxis);
|
||||
CV_RegisterVar(&cv_sideaxis2);
|
||||
|
|
|
@ -316,6 +316,8 @@ consvar_t cv_consolechat = CVAR_INIT ("chatmode", "Window", CV_SAVE, consolechat
|
|||
// Pause game upon window losing focus
|
||||
consvar_t cv_pauseifunfocused = CVAR_INIT ("pauseifunfocused", "Yes", CV_SAVE, CV_YesNo, NULL);
|
||||
|
||||
consvar_t cv_instantretry = CVAR_INIT ("instantretry", "No", CV_SAVE, CV_YesNo, NULL);
|
||||
|
||||
consvar_t cv_crosshair = CVAR_INIT ("crosshair", "Cross", CV_SAVE, crosshair_cons_t, NULL);
|
||||
consvar_t cv_crosshair2 = CVAR_INIT ("crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NULL);
|
||||
consvar_t cv_invertmouse = CVAR_INIT ("invertmouse", "Off", CV_SAVE, CV_OnOff, NULL);
|
||||
|
@ -2173,9 +2175,9 @@ boolean G_Responder(event_t *ev)
|
|||
if (menuactive || pausedelay < 0 || leveltime < 2)
|
||||
return true;
|
||||
|
||||
if (pausedelay < 1+(NEWTICRATE/2))
|
||||
if (!cv_instantretry.value && pausedelay < 1+(NEWTICRATE/2))
|
||||
pausedelay = 1+(NEWTICRATE/2);
|
||||
else if (++pausedelay > 1+(NEWTICRATE/2)+(NEWTICRATE/3))
|
||||
else if (cv_instantretry.value || ++pausedelay > 1+(NEWTICRATE/2)+(NEWTICRATE/3))
|
||||
{
|
||||
G_SetModeAttackRetryFlag();
|
||||
return true;
|
||||
|
|
|
@ -49,6 +49,8 @@ extern boolean promptactive;
|
|||
|
||||
extern consvar_t cv_pauseifunfocused;
|
||||
|
||||
extern consvar_t cv_instantretry;
|
||||
|
||||
// used in game menu
|
||||
extern consvar_t cv_tutorialprompt;
|
||||
extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatbacktint, cv_chatspamprotection, cv_compactscoreboard;
|
||||
|
|
|
@ -2025,7 +2025,7 @@ void HU_Drawer(void)
|
|||
V_DrawCenteredString(BASEVIDWIDTH/2, 180, V_YELLOWMAP | V_ALLOWLOWERCASE, resynch_text);
|
||||
}
|
||||
|
||||
if (modeattacking && pausedelay > 0 && !pausebreakkey)
|
||||
if (modeattacking && pausedelay > 0 && !(pausebreakkey || cv_instantretry.value))
|
||||
{
|
||||
INT32 strength = ((pausedelay - 1 - NEWTICRATE/2)*10)/(NEWTICRATE/3);
|
||||
INT32 y = hudinfo[HUD_LIVES].y - 13;
|
||||
|
|
Loading…
Reference in a new issue