From: z411 Date: Tue, 22 Feb 2022 03:01:03 +0000 (-0300) Subject: Change overtimes and timeout status to int X-Git-Tag: xonotic-v0.8.5~177^2~15 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d642869b5cbf0eb0d1e9a461f2b7839952aeaab4;p=xonotic%2Fxonotic-data.pk3dir.git Change overtimes and timeout status to int --- 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;