X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fscoreboard.qc;h=c8609dc321349e8cdb1aea6fa085d6b6d361f842;hp=d1c7fb9f1eafae4bef8f8d0f699adac282e99998;hb=e80962600618cee1bb882cf785a2f3011466e12c;hpb=e3c57d4e706a9ee1342e25a178955162f4f5925f diff --git a/qcsrc/client/scoreboard.qc b/qcsrc/client/scoreboard.qc index d1c7fb9f1..c8609dc32 100644 --- a/qcsrc/client/scoreboard.qc +++ b/qcsrc/client/scoreboard.qc @@ -290,7 +290,7 @@ void Cmd_HUD_Help() #define HUD_DefaultColumnLayout() \ "ping pl name | " \ "-teams,race,lms/kills +ft,tdm/kills -teams,lms/deaths +ft,tdm/deaths -teams,lms,race,ka/suicides +ft,tdm/suicides -race,dm,tdm,ka,ft/frags " /* tdm already has this in "score" */ \ -"+ctf/caps +ctf/pickups +ctf/fckills +ctf/returns " \ +"+ctf/caps +ctf/pickups +ctf/fckills +ctf/returns +ons/caps +ons/takes " \ "+lms/lives +lms/rank " \ "+kh/caps +kh/pushes +kh/destroyed " \ "?+race/laps ?+race/time ?+race/fastest " \ @@ -519,7 +519,7 @@ string HUD_GetField(entity pl, float field) { case SP_PING: if (!pl.gotscores) - return "\xEE\x82\x8D\xEE\x82\x8D\xEE\x82\x8D"; // >>> sign + return "\xE2\x96\xB6\xE2\x96\xB6\xE2\x96\xB6"; // >>> sign using U+25B6 //str = getplayerkeyvalue(pl.sv_entnum, "ping"); f = pl.ping; if(f == 0) @@ -555,7 +555,7 @@ string HUD_GetField(entity pl, float field) 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); @@ -695,7 +695,7 @@ void HUD_PrintScoreboardItem(vector pos, vector item_size, entity pl, float is_s // 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; @@ -874,7 +874,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz 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); @@ -893,7 +893,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz 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; @@ -950,6 +950,8 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz float HUD_WouldDrawScoreboard() { if (autocvar__hud_configure) return 0; + else if (HUD_Radar_Clickable()) + return 0; else if (scoreboard_showscores) return 1; else if (intermission == 1) @@ -994,7 +996,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size) // 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); } @@ -1088,7 +1090,7 @@ vector HUD_DrawMapStats(vector pos, vector rgb, vector bg_size) { float stat_monsters_killed, stat_monsters_total; float rows = 0; string val; - + // get monster stats stat_monsters_killed = getstatf(STAT_MONSTERS_KILLED); stat_monsters_total = getstatf(STAT_MONSTERS_TOTAL); @@ -1185,7 +1187,7 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl, vector rgb, vector bg_ 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);