]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Cleanup: remove unneeded strcats, leading and trailing spaces and newlines from msgs
authorterencehill <piuntn@gmail.com>
Sun, 26 Jun 2011 11:59:38 +0000 (13:59 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 26 Jun 2011 11:59:38 +0000 (13:59 +0200)
qcsrc/client/hud.qc
qcsrc/server/arena.qc
qcsrc/server/campaign.qc
qcsrc/server/mutators/gamemode_keepaway.qc

index 7bfc57e66f732ef65791931ad56d4249619ba183..e49fd49117ea91153d7fa1433c501f2b00cd2227 100644 (file)
@@ -1841,34 +1841,34 @@ void HUD_Centerprint(string s1, string s2, float type, float msg)
                if (type == DEATH_TEAMCHANGE) {
                        centerprint(strcat(sprintf(_("You are now on: %s"), s1)));
                } else if (type == DEATH_AUTOTEAMCHANGE) {
-                       centerprint(strcat(sprintf(_("You have been moved into a different team to improve team balance\nYou are now on: %s"), s1)));
+                       centerprint(sprintf(_("You have been moved into a different team to improve team balance\nYou are now on: %s"), s1));
                } else if (type == DEATH_CAMP) {
                        if(gentle)
-                               centerprint(strcat(_("^1Reconsider your tactics, camper!")));
+                               centerprint(_("^1Reconsider your tactics, camper!"));
                        else
-                               centerprint(strcat(_("^1Die camper!")));
+                               centerprint(_("^1Die camper!"));
                } else if (type == DEATH_NOAMMO) {
                        if(gentle)
-                               centerprint(strcat(_("^1You are reinserted into the game for running out of ammo...")));
+                               centerprint(_("^1You are reinserted into the game for running out of ammo..."));
                        else
-                               centerprint(strcat(_("^1You were killed for running out of ammo...")));
+                               centerprint(_("^1You were killed for running out of ammo..."));
                } else if (type == DEATH_ROT) {
                        if(gentle)
-                               centerprint(strcat(_("^1You need to preserve your health")));
+                               centerprint(_("^1You need to preserve your health"));
                        else
-                               centerprint(strcat(_("^1You grew too old without taking your medicine")));
+                               centerprint(_("^1You grew too old without taking your medicine"));
                } else if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
                        if(gentle)
-                               centerprint(strcat(_("^1Don't go against team mates!")));
+                               centerprint(_("^1Don't go against team mates!"));
                        else
-                               centerprint(strcat(_("^1Don't shoot your team mates!")));
+                               centerprint(_("^1Don't shoot your team mates!"));
                } else if (type == DEATH_QUIET) {
                        // do nothing
                } else { // generic message
                        if(gentle)
-                               centerprint(strcat(_("^1You need to be more careful!")));
+                               centerprint(_("^1You need to be more careful!"));
                        else
-                               centerprint(strcat(_("^1You killed your own dumb self!")));
+                               centerprint(_("^1You killed your own dumb self!"));
                }
        } else if(msg == MSG_KILL) {
                if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
@@ -1879,15 +1879,15 @@ void HUD_Centerprint(string s1, string s2, float type, float msg)
                        }
                } else if (type == KILL_FIRST_BLOOD) {
                        if(gentle) {
-                               centerprint(strcat(_("^1First score")));
+                               centerprint(_("^1First score"));
                        } else {
-                               centerprint(strcat(_("^1First blood")));
+                               centerprint(_("^1First blood"));
                        }
                } else if (type == KILL_FIRST_VICTIM) {
                        if(gentle) {
-                               centerprint(strcat(_("^1First casualty")));
+                               centerprint(_("^1First casualty"));
                        } else {
-                               centerprint(strcat(_("^1First victim")));
+                               centerprint(_("^1First victim"));
                        }
                } else if (type == KILL_TYPEFRAG) { // s2 contains "advanced kill messages" such as ping, handicap...
                        if(gentle) {
@@ -1916,7 +1916,7 @@ void HUD_Centerprint(string s1, string s2, float type, float msg)
                }
        } else if(msg == MSG_KILL_ACTION) {
                // TODO: invent more centerprints here?
-               centerprint(strcat(_("^1Watch your step!")));
+               centerprint(_("^1Watch your step!"));
        }
 }
 
index 4c82b3f344c40748f36c9a238fcabfd069b82ade..61de86157858365a885cf8569e89f85703949fe5 100644 (file)
@@ -395,7 +395,7 @@ void Spawnqueue_Check()
                        if (time > warntime)
                        {
                                FOR_EACH_PLAYER(self)
-                                       centerprint(self, strcat("^1Need at least 1 player in each team to play CA", "^7\n"));
+                                       centerprint(self, "^1Need at least 1 player in each team to play CA");
                                warntime = time + 1;
                        }
                        return;
@@ -405,7 +405,7 @@ void Spawnqueue_Check()
                                next_round = time + 5;
                        }
                        else if((!redspawned && !bluespawned) || time - warmup > autocvar_g_ca_round_timelimit) {
-                               FOR_EACH_CLIENT(self) centerprint(self, strcat("^7Round tied.", "^7\n"));
+                               FOR_EACH_CLIENT(self) centerprint(self, "^7Round tied");
                                next_round = time + 5;
                        }
 
@@ -415,14 +415,14 @@ void Spawnqueue_Check()
                        if(redalive && !bluealive)
                        {
                                play2all("ctf/red_capture.wav");
-                               FOR_EACH_CLIENT(self) centerprint(self, "^1 RED ^7team wins the round.\n");
+                               FOR_EACH_CLIENT(self) centerprint(self, "^1RED ^7team wins the round");
                                TeamScore_AddToTeam(COLOR_TEAM1, ST_SCORE, +1);
                                stopalivecheck = TRUE;
                        }
                        else if(bluealive && !redalive)
                        {
                                play2all("ctf/blue_capture.wav");
-                               FOR_EACH_CLIENT(self) centerprint(self, "^4 BLUE ^7team wins the round.\n");
+                               FOR_EACH_CLIENT(self) centerprint(self, "^4BLUE ^7team wins the round");
                                TeamScore_AddToTeam(COLOR_TEAM2, ST_SCORE, +1);
                                stopalivecheck = TRUE;
                        }
index bca53cb4ddcd7b552dff576095eb0bf8ac5098b2..923950b5071cd4084dff6e3b3750f61560822784 100644 (file)
@@ -108,7 +108,7 @@ void CampaignPreInit()
 
        title = campaign_shortdesc[0];
        title = strzone(strcat("Level ", ftos(campaign_level + 1), ": ", title));
-       campaign_message = strzone(strcat("^1\n", title, "\n^3\n", campaign_longdesc[0], "\n\n^1press jump to enter the game"));
+       campaign_message = strzone(strcat(title, "\n^3\n", campaign_longdesc[0], "\n\n^1press jump to enter the game"));
        strunzone(title);
 }
 
index f3828adc2dd54fa1bbdf96b2eb13c18904875b5e..5a3c42e3f192c3e52b16e364a50cae7eb15cf895 100644 (file)
@@ -127,7 +127,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        // messages and sounds
        Send_KillNotification(other.netname, "", "", KA_PICKUPBALL, MSG_KA);
        WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
-       WriteString(MSG_BROADCAST, strcat("\n\n", other.netname, "^7 has picked up the ball!\n"));
+       WriteString(MSG_BROADCAST, strcat(other.netname, "^7 has picked up the ball!"));
        sound(self.owner, CHAN_AUTO, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring
@@ -169,7 +169,7 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los
        // messages and sounds
        Send_KillNotification(plyr.netname, "", "", KA_DROPBALL, MSG_KA);
        WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
-       WriteString(MSG_BROADCAST, strcat("\n\n", plyr.netname, "^7 has dropped the ball!\n"));
+       WriteString(MSG_BROADCAST, strcat(plyr.netname, "^7 has dropped the ball!"));
        sound(other, CHAN_AUTO, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE);   // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring