{\r
float score, distribution, leader;\r
vector score_pos, secondary_score_pos, race_score_pos, distribution_color;\r
- string racetime;\r
+ string racetime, secondary_racetime;\r
entity tm, pl, me;\r
me = (spectatee_status > 0) ? playerslots[spectatee_status - 1] : playerslots[player_localentnum - 1];\r
\r
score = me.(scores[ps_primary]);\r
\r
float racemin, racesec, racemsec;\r
- float distsec, distmsec, minusplus;\r
+ float distsec, distmsec;\r
string s_racemin, s_racesec, s_racemsec;\r
\r
racemin = floor(score/(60 * TIME_FACTOR));\r
if (distribution < TIME_FACTOR && distribution > -TIME_FACTOR)\r
distmsec = fabs(distribution);\r
else {\r
- distsec = floor(fabs(distribution)/TIME_FACTOR);\r
- distmsec = fabs(distribution) - distsec*TIME_FACTOR;\r
- if (distribution < 0)\r
- distsec = -distsec;\r
+ distsec = floor(fabs(distribution) / TIME_FACTOR);\r
+ distmsec = fabs(distribution) - distsec * TIME_FACTOR;\r
}\r
\r
- if (distribution <= 0) {\r
+ if (distribution < 0) {\r
distribution_color = '0 1 0';\r
- minusplus = 1; // minusplus 1: always prefix with minus sign\r
+ secondary_racetime = "-"; // always prefix with minus sign\r
}\r
- else {\r
+ else if (distribution > 0) {\r
distribution_color = '1 0 0';\r
- minusplus = 2; // minusplus 1: always prefix with plus sign\r
+ secondary_racetime = "+"; // minusplus 1: always prefix with plus sign\r
}\r
- Sbar_DrawXNum(score_pos + '222 -6 0' - '14 0 0' * TIME_DECIMALS, distmsec, -TIME_DECIMALS, 0, 14, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
- Sbar_DrawXNum(score_pos + '222 6 0' - '14 0 0' * TIME_DECIMALS, distsec, 4, minusplus, 14, distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
+\r
+ secondary_racetime = strcat(secondary_racetime, ftos(distsec), ".", ftos(distmsec));\r
+ drawstring(score_pos + '222 0 0' - '14 0 0', secondary_racetime, '14 14 0', distribution_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
}\r
\r
racetime = strcat(s_racemin, " : ", s_racesec, " . ", s_racemsec);\r
race_score_pos = top + '0 0 0';\r
race_score_pos -= '1 0 0' * stringwidth(racetime, FALSE, '30 30 0') * 0.5;\r
- drawstring(race_score_pos, racetime, '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_ADDITIVE);\r
+ drawstring(race_score_pos, racetime, '30 30 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);\r
\r
} else if (!teamplay) { // non-teamgames, except race/cts\r
// me vector := [team/connected frags id]\r