From d642869b5cbf0eb0d1e9a461f2b7839952aeaab4 Mon Sep 17 00:00:00 2001 From: z411 Date: Tue, 22 Feb 2022 00:01:03 -0300 Subject: [PATCH] Change overtimes and timeout status to int --- qcsrc/client/hud/panel/timer.qc | 4 ++-- qcsrc/common/stats.qh | 8 ++++---- qcsrc/server/world.qc | 2 +- qcsrc/server/world.qh | 1 - 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/qcsrc/client/hud/panel/timer.qc b/qcsrc/client/hud/panel/timer.qc index f52eecb16..e4deafca1 100644 --- a/qcsrc/client/hud/panel/timer.qc +++ b/qcsrc/client/hud/panel/timer.qc @@ -48,8 +48,8 @@ void HUD_Timer() string timer; string subtimer = string_null; string subtext = string_null; - float timelimit, timeleft, overtimes; - float round_timelimit, round_timeleft; + float timelimit, timeleft, round_timelimit, round_timeleft; + int overtimes; vector timer_size, subtext_size, subtimer_size; vector timer_color = '1 1 1'; vector subtimer_color = '1 1 1'; diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index afc4b5e9f..e91aa3725 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -79,8 +79,8 @@ float game_stopped; float game_starttime; //point in time when the countdown to game start is over float round_starttime; //point in time when the countdown to round start is over int autocvar_leadlimit; -float checkrules_overtimesadded; -float timeout_status; // (values: 0, 1, 2) contains whether a timeout is not active (0), was called but still at leadtime (1) or is active (2) +int checkrules_overtimesadded; +int timeout_status; // (values: 0, 1, 2) contains whether a timeout is not active (0), was called but still at leadtime (1) or is active (2) // TODO: world.qh can't be included here due to circular includes! #define autocvar_fraglimit cvar("fraglimit") @@ -118,8 +118,8 @@ REGISTER_STAT(SECRETS_TOTAL, int, secrets_total) REGISTER_STAT(SECRETS_FOUND, int, secrets_found) REGISTER_STAT(RESPAWN_TIME, float) REGISTER_STAT(ROUNDSTARTTIME, float, round_starttime) -REGISTER_STAT(OVERTIMESADDED, float, checkrules_overtimesadded) -REGISTER_STAT(TIMEOUT_STATUS, float, timeout_status) +REGISTER_STAT(OVERTIMESADDED, int, checkrules_overtimesadded) +REGISTER_STAT(TIMEOUT_STATUS, int, timeout_status) REGISTER_STAT(MONSTERS_TOTAL, int) REGISTER_STAT(MONSTERS_KILLED, int) REGISTER_STAT(NADE_BONUS, float) diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index 604b4bd5b..be272b1fc 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -1636,7 +1636,7 @@ void CheckRules_World() Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_RACE_FINISHLAP); else Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_OVERTIME_FRAG); - checkrules_overtimesadded = 1; + checkrules_overtimesadded = 1; // Treat sudden death as an overtime } } else diff --git a/qcsrc/server/world.qh b/qcsrc/server/world.qh index 9cd9799f6..b23ffc4d8 100644 --- a/qcsrc/server/world.qh +++ b/qcsrc/server/world.qh @@ -30,7 +30,6 @@ float autocvar_timelimit_suddendeath; float checkrules_equality; float checkrules_suddendeathwarning; float checkrules_suddendeathend; -//float checkrules_overtimesadded; //how many overtimes have been already added // flag set on worldspawn so that the code knows if it is dedicated or not bool server_is_dedicated; -- 2.39.2