]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove a not very useful variable
authorterencehill <piuntn@gmail.com>
Tue, 16 Aug 2016 13:44:08 +0000 (15:44 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 16 Aug 2016 13:44:08 +0000 (15:44 +0200)
qcsrc/client/hud/panel/timer.qc

index a56b83ff7e1208074b947633d40fdb9e4a2ac280..a87ca93a22695b46d52ed5a9ebef74df401d55a4 100644 (file)
@@ -26,7 +26,7 @@ void HUD_Timer()
        }
 
        string timer;
-       float timelimit, elapsedTime, timeleft, minutesLeft;
+       float timelimit, timeleft, minutesLeft;
 
        timelimit = STAT(TIMELIMIT);
 
@@ -57,13 +57,10 @@ void HUD_Timer()
        if (gameover_time) {
                timer = seconds_tostring(max(0, floor(gameover_time - STAT(GAMESTARTTIME))));
        } else if (autocvar_hud_panel_timer_increment || (!warmup_stage && timelimit == 0) || (warmup_stage && warmup_timeleft <= 0)) {
-               if (time < STAT(GAMESTARTTIME)) {
-                       //while restart is still active, show 00:00
-                       timer = seconds_tostring(0);
-               } else {
-                       elapsedTime = floor(time - STAT(GAMESTARTTIME));
-                       timer = seconds_tostring(elapsedTime);
-               }
+               if (time < STAT(GAMESTARTTIME))
+                       timer = seconds_tostring(0); //while restart is still active, show 00:00
+               else
+                       timer = seconds_tostring(floor(time - STAT(GAMESTARTTIME)));
        } else {
                if(warmup_stage)
                        timer = seconds_tostring(warmup_timeleft);