X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Ftimer.qc;h=8bb4ade6a17f49aca0f69be10c5ffa303069af2f;hb=06a08d0c6b573f2562297147171aff3d990fa42d;hp=fab0392dc08938d19dd27046faf608e9f1241931;hpb=06bf8b3259ecb57a7264e04deeb1b1f3656b87fd;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/timer.qc b/qcsrc/client/hud/panel/timer.qc index fab0392dc..8bb4ade6a 100644 --- a/qcsrc/client/hud/panel/timer.qc +++ b/qcsrc/client/hud/panel/timer.qc @@ -1,7 +1,16 @@ #include "timer.qh" +#include +#include +#include + // Timer (#5) +void HUD_Timer_Export(int fh) +{ + // allow saving cvars that aesthetically change the panel into hud skin files +} + void HUD_Timer() { if(!autocvar__hud_configure) @@ -50,15 +59,17 @@ void HUD_Timer() } vector timer_color; - if(gameover_time || minutesLeft >= 5 || warmup_stage || timelimit == 0) + if(intermission_time || minutesLeft >= 5 || warmup_stage || timelimit == 0) timer_color = '1 1 1'; //white else if(minutesLeft >= 1) timer_color = '1 1 0'; //yellow else timer_color = '1 0 0'; //red - if (gameover_time) { - timer = seconds_tostring(max(0, floor(gameover_time - STAT(GAMESTARTTIME)))); + if (intermission_time) { + timer = seconds_tostring(max(0, floor(intermission_time - STAT(GAMESTARTTIME)))); + } else if (warmup_stage && warmup_timeleft >= 60) { + timer = _("WARMUP"); } else if (autocvar_hud_panel_timer_increment || (!warmup_stage && timelimit == 0) || (warmup_stage && warmup_timeleft <= 0)) { if (time < STAT(GAMESTARTTIME)) timer = seconds_tostring(0); //while restart is still active, show 00:00