]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Colorize vote and race record names when they're used instead of zoning them with...
authorMario <mario@smbclan.net>
Sun, 12 Feb 2017 01:13:31 +0000 (11:13 +1000)
committerMario <mario@smbclan.net>
Sun, 12 Feb 2017 01:13:31 +0000 (11:13 +1000)
qcsrc/client/hud/panel/racetimer.qc
qcsrc/client/hud/panel/vote.qc
qcsrc/client/main.qc

index 02b631b3000932cbd2ee69f812e5cc8446f2aed1..5efbd00ceb99ccda756c6747bdf12d7e7c6fb953 100644 (file)
@@ -71,7 +71,7 @@ string MakeRaceString(int cp, float mytime, float theirtime, float lapdelta, str
        else if(theirname == "")
                return strcat(col, sprintf("%s (%s)", cpname, timestr));
        else
-               return strcat(col, sprintf("%s (%s %s)", cpname, timestr, strcat(theirname, col, lapstr)));
+               return strcat(col, sprintf("%s (%s %s)", cpname, timestr, strcat(ColorTranslateRGB(theirname), col, lapstr)));
 }
 
 void HUD_RaceTimer ()
index 1c2ea03bc8ec3a11708c7921a976855b6e4ee9fb..d974bee4bd3dca9fbf8b8307a0354d86b3fd211d 100644 (file)
@@ -116,7 +116,7 @@ void HUD_Vote()
        if(uid2name_dialog)
                s = _("Allow servers to store and display your name?");
        drawstring_aspect(pos, s, eX * mySize.x + eY * (2/8) * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-       s = textShortenToWidth(vote_called_vote, mySize.x, '1 1 0' * mySize.y * (1/8), stringwidth_colors);
+       s = textShortenToWidth(ColorTranslateRGB(vote_called_vote), mySize.x, '1 1 0' * mySize.y * (1/8), stringwidth_colors);
        if(autocvar__hud_configure)
                s = _("^1Configure the HUD");
        drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize.y, s, eX * mySize.x + eY * (1.75/8) * mySize.y, panel_fg_alpha, DRAWFLAG_NORMAL);
index 9a6c25c35279a41dcdaccbe586a9ee5a1c2775a1..4fbb2f282ad814e075e0283ca6be5aed918eec9c 100644 (file)
@@ -567,7 +567,7 @@ NET_HANDLE(ENT_CLIENT_NAGGER, bool isnew)
        {
                if(vote_called_vote)
                        strunzone(vote_called_vote);
-               vote_called_vote = strzone(ColorTranslateRGB(ReadString()));
+               vote_called_vote = strzone(ReadString());
        }
 
        if(nags & 1)
@@ -1033,7 +1033,7 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew)
                        race_previousbesttime = ReadInt24_t();
                        if(race_previousbestname)
                                strunzone(race_previousbestname);
-                       race_previousbestname = strzone(ColorTranslateRGB(ReadString()));
+                       race_previousbestname = strzone(ReadString());
 
                        race_checkpointtime = time;
 
@@ -1060,7 +1060,7 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew)
                        race_nextbesttime = ReadInt24_t();
                        if(race_nextbestname)
                                strunzone(race_nextbestname);
-                       race_nextbestname = strzone(ColorTranslateRGB(ReadString()));
+                       race_nextbestname = strzone(ReadString());
                        break;
 
                case RACE_NET_CHECKPOINT_HIT_RACE:
@@ -1072,7 +1072,7 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew)
                                race_mycheckpointlapsdelta -= 256;
                        if(race_mycheckpointenemy)
                                strunzone(race_mycheckpointenemy);
-                       race_mycheckpointenemy = strzone(ColorTranslateRGB(ReadString()));
+                       race_mycheckpointenemy = strzone(ReadString());
                        break;
 
                case RACE_NET_CHECKPOINT_HIT_RACE_BY_OPPONENT:
@@ -1084,7 +1084,7 @@ NET_HANDLE(TE_CSQC_RACE, bool isNew)
                                race_othercheckpointlapsdelta -= 256;
                        if(race_othercheckpointenemy)
                                strunzone(race_othercheckpointenemy);
-                       race_othercheckpointenemy = strzone(ColorTranslateRGB(ReadString()));
+                       race_othercheckpointenemy = strzone(ReadString());
                        break;
 
                case RACE_NET_PENALTY_RACE: