13 string MakeRaceString(
int cp,
float mytime,
float theirtime,
float othertime,
float lapdelta,
string theirname)
16 string cpname, lapstr =
"", timestr =
"", col =
"^7", othercol =
"^7", othertimestr =
"";
43 else if(othertime == 0)
45 othertimestr =
"+0.0";
56 lapstr = sprintf(_(
" (-%dL)"), lapdelta);
61 lapstr = sprintf(_(
" (+%dL)"), -lapdelta);
65 else if(theirtime > 0)
67 if(mytime >= theirtime)
72 if(mytime >= othertime)
80 cpname = _(
"Start line");
82 cpname = _(
"Finish line");
84 cpname = sprintf(_(
"Intermediate %d"), cp);
86 cpname = _(
"Finish line");
89 return strcat(col, cpname);
90 else if(theirname ==
"")
91 return strcat(col, sprintf(
"%s (%s)", cpname, timestr));
93 return strcat(col, sprintf(
"%s %s(%s)%s (%s %s)", cpname, othercol, othertimestr, col, timestr,
strcat(
ColorTranslateRGB(theirname), col, lapstr)));
126 if(mySize.x/mySize.y > 4)
128 newSize.x = 4 * mySize.y;
129 newSize.y = mySize.y;
131 pos.x = pos.x + (mySize.x - newSize.x) / 2;
135 newSize.y = 1/4 * mySize.x;
136 newSize.x = mySize.x;
138 pos.y = pos.y + (mySize.y - newSize.y) / 2;
150 str_pos = pos +
eX * 0.5 * (mySize.x -
stringwidth(s,
false,
'1 1 0' * 0.6 * mySize.y));
153 s =
strcat(
"^1", sprintf(_(
"Intermediate %d"), 1),
" (+15.42)");
154 str_pos = pos +
vec2(0.5 * (mySize.x -
stringwidth(s,
true,
'1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y);
156 s = sprintf(_(
"PENALTY: %.1f (%s)"), 2, _(
"missing a checkpoint"));
158 str_pos = pos +
vec2(0.5 * (mySize.x -
stringwidth(s,
true,
'1 1 0' * 0.2 * mySize.y)), 0.8 * mySize.y);
194 str_pos = pos +
vec2(0.5 * (mySize.x -
stringwidth(s,
true,
'1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y);
205 str_pos = pos +
vec2(0.5 * (mySize.x -
stringwidth(s,
true,
'1 1 0' * 0.2 * mySize.y)), 0.8 * mySize.y);
215 str_pos = pos +
eX * 0.5 * (mySize.x -
stringwidth(forcetime,
false,
'1 1 0' * 0.6 * mySize.y));
224 str_pos = pos +
eX * 0.5 * (mySize.x -
stringwidth(s,
false,
'0.6 0.6 0' * mySize.y));
236 str_pos = pos +
vec2(0.5 * (mySize.x -
stringwidth(s,
true,
'1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y);
243 str_pos = pos +
vec2(0.5 * (mySize.x -
stringwidth(s,
true,
'1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y);
256 t = (t -
time) * 0.1;
266 str_pos = pos +
vec2(0.5 * (mySize.x -
stringwidth(s,
true,
'1 1 0' * 0.2 * mySize.y)), 0.6 * mySize.y);
#define draw_endBoldFont()
ERASEABLE string ftos_decimals(float number, int decimals)
converts a number to a string with the indicated number of decimals
float race_mycheckpointdelta
bool autocvar__hud_configure
#define draw_beginBoldFont()
float race_othercheckpointdelta
#define TIME_ENCODED_TOSTRING(n)
float race_nextcheckpoint
float race_previousbesttime
#define HUD_Panel_DrawBg()
bool autocvar_hud_panel_racetimer
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
bool autocvar_hud_panel_racetimer_dynamichud
void drawstring_expanding(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag, float fadelerp)
ERASEABLE string ColorTranslateRGB(string s)
float race_othercheckpointlapsdelta
const float DRAWFLAG_NORMAL
float race_mycheckpointtime
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float race_checkpointtime
#define MUTATOR_CALLHOOK(id,...)
string race_previousbestname
float race_othercheckpoint
float race_mycheckpointlapsdelta
void HUD_RaceTimer_Export(int fh)
string race_penaltyreason
string MakeRaceString(int cp, float mytime, float theirtime, float othertime, float lapdelta, string theirname)
float race_othercheckpointtime
float race_penaltyeventtime
float race_mypreviousbesttime
string race_mycheckpointenemy
float race_penaltyaccumulator
bool autocvar_cl_race_cptimes_showself
string race_othercheckpointenemy
void HUD_Panel_LoadCvars()