return;
}
+ string time_text = string_null;
+ vector timer_color = '1 1 1';
+ if(!STAT(GAME_STOPPED) && !warmup_stage && STAT(SURVIVAL_ROUNDTIMER) > 0)
+ {
+ float timeleft = max(0, STAT(SURVIVAL_ROUNDTIMER) - time);
+ timeleft = ceil(timeleft);
+ float minutesLeft = floor(timeleft / 60);
+ time_text = seconds_tostring(timeleft);
+ if(intermission_time || minutesLeft >= 5 || warmup_stage || STAT(SURVIVAL_ROUNDTIMER) == 0)
+ timer_color = '1 1 1'; //white
+ else if(minutesLeft >= 1)
+ timer_color = '1 1 0'; //yellow
+ else
+ timer_color = '1 0 0'; //red
+ }
+
//drawpic_aspect_skin(pos, player_icon, vec2(0.5 * mySize.x, mySize.y), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
- drawstring_aspect(pos, player_text, vec2(mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+ if(!time_text)
+ drawstring_aspect(pos, player_text, vec2(mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+ else
+ {
+ drawstring_aspect(pos, player_text, vec2(0.5 * mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+ drawstring_aspect(pos + eX * (0.5 * mySize.x), time_text, vec2(0.5 * mySize.x, mySize.y), timer_color, panel_fg_alpha, DRAWFLAG_NORMAL);
+ }
}
REGISTER_MUTATOR(cl_sv, true);
{
if(!IS_REAL_CLIENT(e))
return;
+#if 0
msg_entity = e;
WriteByte(MSG_ONE, 3); // svc_updatestat
WriteByte(MSG_ONE, 236); // STAT_TIMELIMIT
WriteCoord(MSG_ONE, autocvar_timelimit);
else
WriteCoord(MSG_ONE, (t + 1) / 60);
+#else
+ STAT(SURVIVAL_ROUNDTIMER, e) = t;
+#endif
}
void nades_Clear(entity player);