pos_y += 1.2 * hud_fontsize_y;
drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, hud_fontsize)), str, hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
- // add information about respawn status
- float respawn_time = getstatf(STAT_RESPAWN_SCHEDULE);
+ // print information about respawn status
+ float respawn_time = getstatf(STAT_RESPAWN_TIME);
if(respawn_time)
{
if(respawn_time < 0)
{
- // a negative value means we are awaiting respawn, time value is still the same
- respawn_time *= -1; // remove our mark now that we checked it
+ // a negative number means we are awaiting respawn, time value is still the same
+ respawn_time *= -1; // remove mark now that we checked it
str = strcat("Respawning in ^3", substring(ftos(bound(0, respawn_time - time, 9.999999)), 0, 4), "^7 seconds...");
}
else if(time < respawn_time)
- {
str = strcat("You are dead, wait ^3", substring(ftos(bound(0, respawn_time - time, 9.999999)), 0, 4), "^7 seconds before respawning");
- }
else if(time >= respawn_time)
- {
str = strcat("You are dead, press ^1", getcommandkey("primary fire", "+fire"), "^7 to respawn");
- }
pos_y += 1.2 * hud_fontsize_y;
drawcolorcodedstring(pos + '0.5 0 0' * (sbwidth - stringwidth(str, TRUE, hud_fontsize)), str, hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
self.damageforcescale = 0;
self.death_time = 0;
self.respawn_time = 0;
- self.respawn_schedule = 0;
self.alpha = 0;
self.scale = 0;
self.fade_time = 0;
self.damageforcescale = 2;
self.death_time = 0;
self.respawn_time = 0;
- self.respawn_schedule = 0;
self.scale = 0;
self.fade_time = 0;
self.pain_frame = 0;
self.stat_game_starttime = game_starttime;
self.stat_allow_oldnexbeam = autocvar_g_allow_oldnexbeam;
self.stat_leadlimit = autocvar_leadlimit;
+ self.stat_respawn_time = self.respawn_time;
if(frametime)
{
ShowRespawnCountdown();
}
- if(self.respawn_schedule != self.respawn_time)
- self.respawn_schedule = self.respawn_time;
- if(self.deadflag == DEAD_RESPAWNING && self.respawn_schedule > 0)
- self.respawn_schedule *= -1; // invert to indicate we're awaiting respawn, the client translates this
+ // if respawning, invert stat_respawn_time to indicate this, the client translates it
+ if(self.deadflag == DEAD_RESPAWNING && self.stat_respawn_time > 0)
+ self.stat_respawn_time *= -1;
return;
}
addstat(STAT_SECRETS_FOUND, AS_FLOAT, stat_secrets_found);
// misc
- addstat(STAT_RESPAWN_SCHEDULE, AS_FLOAT, respawn_schedule);
+ addstat(STAT_RESPAWN_TIME, AS_FLOAT, stat_respawn_time);
next_pingtime = time + 5;