]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'LegendaryGuard/bai_mod' into z411/bai-server
authorz411 <z411@omaera.org>
Sat, 17 Apr 2021 22:59:11 +0000 (18:59 -0400)
committerz411 <z411@omaera.org>
Sat, 17 Apr 2021 22:59:11 +0000 (18:59 -0400)
1  2 
qcsrc/client/hud/panel/scoreboard.qc

index 8100e0f8b4c39e8628a990a9c8817ba6ee07ff71,579e7d8b55dfa5d6ad350103eac191ee17b9c0db..bfb067d18a71c443bc6d6dccae2c5a8ce4b35f1e
@@@ -715,12 -715,12 +716,17 @@@ string Scoreboard_GetField(entity pl, P
                        tmp = bound(0, f / 0.2 + tmp / 0.04, 1); // 20% is REALLY BAD pl
                        sbt_field_rgb = '1 0.5 0.5' - '0 0.5 0.5' * tmp;
                        return str;
 +              
 +              //LegendGuard adds Country REGISTER in the switch 05-04-2021
 +              case SP_COUNTRY:
 +                      str = Scoreboard_GetCountrycode(pl);
 +                      return str;
  
+               //LegendGuard adds Country REGISTER in the switch 05-04-2021
+               case SP_COUNTRY:
+                       str = Scoreboard_GetCountrycode(pl);
+                       return str;
                case SP_NAME:
                        str = Scoreboard_GetName(pl);
                        if (autocvar_hud_panel_scoreboard_playerid)
@@@ -1289,10 -1275,10 +1293,23 @@@ void Scoreboard_Duel_DrawTable(vector p
                tmp_in.y += (duel_name_fontsize.y - hud_fontsize.y) / 2;
                drawpic(tmp_in, sbt_field_icon0, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon1_rgb, panel_fg_alpha, DRAWFLAG_NORMAL);
        }
+       //LegendGuard adds a conditional sentence for country column 05-04-2021
+       // Player country icon/flag
+       if(sbt_field_icon3 != "") {
++              vector rsz = draw_getimagesize(sbt_field_icon3);
++              sbt_fixcolumnwidth_iconlen = rsz.x / rsz.y;
++              if(invert)
++                      tmp_in.x -= hud_fontsize.x * sbt_fixcolumnwidth_iconlen + duel_name_fontsize.x * 0.5;
++              else
++                      tmp_in.x += stringwidth_colors(tmp_str, duel_name_fontsize) + duel_name_fontsize.x * 0.5;
++              tmp_in.y += (duel_name_fontsize.y - hud_fontsize.y) / 2;
++              drawpic(tmp_in, sbt_field_icon3, vec2(hud_fontsize.x * sbt_fixcolumnwidth_iconlen, hud_fontsize.y), sbt_field_icon1_rgb, panel_fg_alpha, DRAWFLAG_NORMAL);
++      }
 +      
 +      //LegendGuard adds a conditional sentence for country column 05-04-2021
 +      // Player country icon/flag
 +      if(sbt_field_icon3 != "") {
                vector rsz = draw_getimagesize(sbt_field_icon3);
                sbt_fixcolumnwidth_iconlen = rsz.x / rsz.y;
                if(invert)