mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Limit con_hudtime to 24 hours
Also rename cons_msgtimeout to cons_hudtime for consistency
This commit is contained in:
parent
02651d249c
commit
e2ee6e45d7
1 changed files with 7 additions and 5 deletions
|
|
@ -70,8 +70,8 @@ static INT32 con_curlines; // vid lines currently used by console
|
||||||
|
|
||||||
INT32 con_clipviewtop; // (useless)
|
INT32 con_clipviewtop; // (useless)
|
||||||
|
|
||||||
static UINT8 con_hudlines; // number of console heads up message lines
|
static UINT8 con_hudlines; // number of console heads up message lines
|
||||||
static INT32 con_hudtime[MAXHUDLINES]; // remaining time of display for hud msg lines
|
static UINT32 con_hudtime[MAXHUDLINES]; // remaining time of display for hud msg lines
|
||||||
|
|
||||||
INT32 con_clearlines; // top screen lines to refresh when view reduced
|
INT32 con_clearlines; // top screen lines to refresh when view reduced
|
||||||
boolean con_hudupdate; // when messages scroll, we need a backgrnd refresh
|
boolean con_hudupdate; // when messages scroll, we need a backgrnd refresh
|
||||||
|
|
@ -124,7 +124,9 @@ static void CONS_backcolor_Change(void);
|
||||||
static char con_buffer[CON_BUFFERSIZE];
|
static char con_buffer[CON_BUFFERSIZE];
|
||||||
|
|
||||||
// how many seconds the hud messages lasts on the screen
|
// how many seconds the hud messages lasts on the screen
|
||||||
static consvar_t cons_msgtimeout = CVAR_INIT ("con_hudtime", "5", CV_SAVE, CV_Unsigned, NULL);
|
// CV_Unsigned can overflow when multiplied by TICRATE later, so let's use a 24-hour limit instead
|
||||||
|
static CV_PossibleValue_t hudtime_cons_t[] = {{0, "MIN"}, {86400, "MAX"}, {0, NULL}};
|
||||||
|
static consvar_t cons_hudtime = CVAR_INIT ("con_hudtime", "5", CV_SAVE, hudtime_cons_t, NULL);
|
||||||
|
|
||||||
// number of lines displayed on the HUD
|
// number of lines displayed on the HUD
|
||||||
static CV_PossibleValue_t hudlines_cons_t[] = {{0, "MIN"}, {MAXHUDLINES, "MAX"}, {0, "None"}, {0, NULL}};
|
static CV_PossibleValue_t hudlines_cons_t[] = {{0, "MIN"}, {MAXHUDLINES, "MAX"}, {0, "None"}, {0, NULL}};
|
||||||
|
|
@ -458,7 +460,7 @@ void CON_Init(void)
|
||||||
|
|
||||||
Unlock_state();
|
Unlock_state();
|
||||||
|
|
||||||
CV_RegisterVar(&cons_msgtimeout);
|
CV_RegisterVar(&cons_hudtime);
|
||||||
CV_RegisterVar(&cons_hudlines);
|
CV_RegisterVar(&cons_hudlines);
|
||||||
CV_RegisterVar(&cons_speed);
|
CV_RegisterVar(&cons_speed);
|
||||||
CV_RegisterVar(&cons_height);
|
CV_RegisterVar(&cons_height);
|
||||||
|
|
@ -1345,7 +1347,7 @@ static void CON_Linefeed(void)
|
||||||
{
|
{
|
||||||
// set time for heads up messages
|
// set time for heads up messages
|
||||||
if (con_hudlines)
|
if (con_hudlines)
|
||||||
con_hudtime[con_cy%con_hudlines] = cons_msgtimeout.value*TICRATE;
|
con_hudtime[con_cy%con_hudlines] = cons_hudtime.value*TICRATE;
|
||||||
|
|
||||||
con_cy++;
|
con_cy++;
|
||||||
con_cx = 0;
|
con_cx = 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue