]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Change overtimes and timeout status to int
authorz411 <z411@omaera.org>
Tue, 22 Feb 2022 03:01:03 +0000 (00:01 -0300)
committerz411 <z411@omaera.org>
Tue, 22 Feb 2022 03:01:03 +0000 (00:01 -0300)
qcsrc/client/hud/panel/timer.qc
qcsrc/common/stats.qh
qcsrc/server/world.qc
qcsrc/server/world.qh

index f52eecb16c45d134e506cea58af048ed5bb71f24..e4deafca14f946d5b4ffede4cf1674ff5334dec3 100644 (file)
@@ -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';
index afc4b5e9ff52011a0d969197608582d0d6a02e67..e91aa37259f5b3fbef9c97e234539a8e337755c5 100644 (file)
@@ -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)
index 604b4bd5be32c5002f1a179a9ef729f3917741ed..be272b1fc10d1af45773889d71833f54123da0a7 100644 (file)
@@ -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
index 9cd9799f6e8f96eeb3e08e7944fa562dd340aa44..b23ffc4d866106fe6af454100c1cf6e225524e22 100644 (file)
@@ -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;