hud_field_icon1 = "gfx/scoreboard/playercolor_shirt";
hud_field_icon1_rgb = colormapPaletteColor(floor(f / 16), 0);
hud_field_icon2 = "gfx/scoreboard/playercolor_pants";
- hud_field_icon2_rgb = colormapPaletteColor(mod(f, 16), 1);
+ hud_field_icon2_rgb = colormapPaletteColor(f % 16, 1);
}
}
return GetPlayerName(pl.sv_entnum);
// alternated rows highlighting
if(is_self)
drawfill(h_pos, h_size, rgb, scoreboard_highlight_alpha_self, DRAWFLAG_NORMAL);
- else if((scoreboard_highlight) && (!mod(pl_number,2)))
+ else if((scoreboard_highlight) && (!(pl_number % 2)))
drawfill(h_pos, h_size, rgb, scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
tmp_x = item_size_x;
column_dim_x = hud_size[i] + hud_fontsize_x;
if (scoreboard_highlight)
{
- if (mod(i,2))
+ if (i % 2)
drawfill(pos - '0 1 0' - hud_fontsize_x / 2 * '1 0 0', column_dim, '0 0 0', scoreboard_alpha_bg * 0.2, DRAWFLAG_NORMAL);
}
drawstring(pos, hud_title[i], hud_fontsize, rgb * 1.5, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
if (scoreboard_highlight)
{
- if (!mod(i,2))
+ if (!(i % 2))
{
if (i == hud_num_fields-1)
column_dim_x = hud_size[i] + hud_fontsize_x / 2 + 1;
// column highlighting
for(i = 0; i < weapon_cnt/rows; ++i)
{
- if(!mod(i, 2))
+ if(!(i % 2))
drawfill(pos + '1 0 0' * weapon_width * rows * i, '0 1 0' * height * rows + '1 0 0' * weapon_width * rows, '0 0 0', scoreboard_alpha_bg * 0.2, DRAWFLAG_NORMAL);
}
average_accuracy += weapon_stats; // store sum of all accuracies in average_accuracy
string s;
- s = sprintf(_("%d%%"), weapon_stats*100);
+ s = sprintf("%d%%", weapon_stats*100);
float padding;
padding = (weapon_width - stringwidth(s, FALSE, '1 0 0' * fontsize)) / 2; // center the accuracy value
p = count_ordinal(i+1);
if(grecordholder[i] == GetPlayerName(player_localnum))
drawfill(pos, '1 0 0' * sbwidth + '0 1.25 0' * hud_fontsize_y, hl_rgb, scoreboard_highlight_alpha_self, DRAWFLAG_NORMAL);
- else if(!mod(i, 2) && scoreboard_highlight)
+ else if(!(i % 2) && scoreboard_highlight)
drawfill(pos, '1 0 0' * sbwidth + '0 1.25 0' * hud_fontsize_y, hl_rgb, scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
drawstring(pos, p, '1 1 0' * hud_fontsize_y, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
drawstring(pos + '3 0 0' * hud_fontsize_y, TIME_ENCODED_TOSTRING(t), '1 1 0' * hud_fontsize_y, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);