]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Get rid of the EOLS at the beginning of the messages, they no longer need, stop/finis...
authorterencehill <piuntn@gmail.com>
Mon, 23 May 2011 22:23:40 +0000 (00:23 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 23 May 2011 22:23:40 +0000 (00:23 +0200)
qcsrc/client/hud.qc
qcsrc/common/constants.qh
qcsrc/server/arena.qc
qcsrc/server/campaign.qc
qcsrc/server/cl_client.qc
qcsrc/server/g_damage.qc
qcsrc/server/t_items.qc
qcsrc/server/teamplay.qc

index 45993d30961769eb993d1517a0f26cb28f4e3983..f0c359de48eb215255946c42f483550c7c63050f 100644 (file)
@@ -1815,92 +1815,90 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
        }
 }
 
-#define DAMAGE_CENTERPRINT_SPACER NEWLINES
-
 void HUD_Centerprint(string s1, string s2, float type, float msg)
 {
        float gentle;
        gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
        if(msg == MSG_SUICIDE) {
                if (type == DEATH_TEAMCHANGE) {
-                       centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("You are now on: %s"), s1)));
+                       centerprint(strcat(sprintf(_("You are now on: %s"), s1)));
                } else if (type == DEATH_AUTOTEAMCHANGE) {
-                       centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("You have been moved into a different team to improve team balance\nYou are now on: %s"), s1)));
+                       centerprint(strcat(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(DAMAGE_CENTERPRINT_SPACER, _("^1Reconsider your tactics, camper!")));
+                               centerprint(strcat(_("^1Reconsider your tactics, camper!")));
                        else
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1Die camper!")));
+                               centerprint(strcat(_("^1Die camper!")));
                } else if (type == DEATH_NOAMMO) {
                        if(gentle)
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1You are reinserted into the game for running out of ammo...")));
+                               centerprint(strcat(_("^1You are reinserted into the game for running out of ammo...")));
                        else
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1You were killed for running out of ammo...")));
+                               centerprint(strcat(_("^1You were killed for running out of ammo...")));
                } else if (type == DEATH_ROT) {
                        if(gentle)
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1You need to preserve your health")));
+                               centerprint(strcat(_("^1You need to preserve your health")));
                        else
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1You grew too old without taking your medicine")));
+                               centerprint(strcat(_("^1You grew too old without taking your medicine")));
                } else if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
                        if(gentle)
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1Don't go against team mates!")));
+                               centerprint(strcat(_("^1Don't go against team mates!")));
                        else
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1Don't shoot your team mates!")));
+                               centerprint(strcat(_("^1Don't shoot your team mates!")));
                } else if (type == DEATH_QUIET) {
                        // do nothing
                } else { // generic message
                        if(gentle)
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1You need to be more careful!")));
+                               centerprint(strcat(_("^1You need to be more careful!")));
                        else
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1You killed your own dumb self!")));
+                               centerprint(strcat(_("^1You killed your own dumb self!")));
                }
        } else if(msg == MSG_KILL) {
                if (type == KILL_TEAM_RED || type == KILL_TEAM_BLUE) {
                        if(gentle) {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1Moron! You went against %s, a team mate!"), s1)));
+                               centerprint(strcat(sprintf(_("^1Moron! You went against %s, a team mate!"), s1)));
                        } else {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1Moron! You fragged %s, a team mate!"), s1)));
+                               centerprint(strcat(sprintf(_("^1Moron! You fragged %s, a team mate!"), s1)));
                        }
                } else if (type == KILL_FIRST_BLOOD) {
                        if(gentle) {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1First score")));
+                               centerprint(strcat(_("^1First score")));
                        } else {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1First blood")));
+                               centerprint(strcat(_("^1First blood")));
                        }
                } else if (type == KILL_FIRST_VICTIM) {
                        if(gentle) {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1First casualty")));
+                               centerprint(strcat(_("^1First casualty")));
                        } else {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1First victim")));
+                               centerprint(strcat(_("^1First victim")));
                        }
                } else if (type == KILL_TYPEFRAG) { // s2 contains "advanced kill messages" such as ping, handicap...
                        if(gentle) {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1You scored against ^7%s^1 who was typing!"), s1), s2));
+                               centerprint(strcat(sprintf(_("^1You scored against ^7%s^1 who was typing!"), s1), s2));
                        } else {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1You typefragged ^7%s"), s1), s2));
+                               centerprint(strcat(sprintf(_("^1You typefragged ^7%s"), s1), s2));
                        }
                } else if (type == KILL_TYPEFRAGGED) {
                        if(gentle) {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1You were scored against by ^7%s^1 while you were typing!"), s1), s2));
+                               centerprint(strcat(sprintf(_("^1You were scored against by ^7%s^1 while you were typing!"), s1), s2));
                        } else {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1You were typefragged by ^7%s"), s1), s2));
+                               centerprint(strcat(sprintf(_("^1You were typefragged by ^7%s"), s1), s2));
                        }
                } else if (type == KILL_FRAG) {
                        if(gentle) {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^4You scored against ^7%s"), s1), s2));
+                               centerprint(strcat(sprintf(_("^4You scored against ^7%s"), s1), s2));
                        } else {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^4You fragged ^7%s"), s1), s2));
+                               centerprint(strcat(sprintf(_("^4You fragged ^7%s"), s1), s2));
                        }
                } else { // generic message
                        if(gentle) {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1You were scored against by ^7%s"), s1), s2));
+                               centerprint(strcat(sprintf(_("^1You were scored against by ^7%s"), s1), s2));
                        } else {
-                               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, sprintf(_("^1You were fragged by ^7%s"), s1), s2));
+                               centerprint(strcat(sprintf(_("^1You were fragged by ^7%s"), s1), s2));
                        }
                }
        } else if(msg == MSG_KILL_ACTION) {
                // TODO: invent more centerprints here?
-               centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, _("^1Watch your step!")));
+               centerprint(strcat(_("^1Watch your step!")));
        }
 }
 
index 04a1588e3a88b5972f2823f34e40dfd80d179f81..31dcf71a946c90d0f41b7b122fd6f9b4f5c8fe66 100644 (file)
@@ -589,6 +589,7 @@ float MAX_SHOT_DISTANCE = 32768;
 #define CPID_ROUND_STARTING            "\r6 "
 #define CPID_GAME_STARTING             "\r7 "
 #define CPID_TIMEOUT_COUNTDOWN "\r8 "
+#define CPID_MOTD                              "\r9 "
 
 // CSQC centerprint/notify message types
 float MSG_SUICIDE = 0;
index 6072c15121fa037c32a660714328d5394069c0a6..6c70e7e65df568c9df45fd1b738ccbc0ab230be9 100644 (file)
@@ -224,7 +224,6 @@ void Arena_Warmup()
        if(ca_players < required_ca_players)
                allowed_to_spawn = 1;
 
-       msg = NEWLINES;
        if(time < warmup && !inWarmupStage)
        {
                if (g_ca)
@@ -263,7 +262,7 @@ void Arena_Warmup()
        {
                roundStartTime_prev = f;
                Announce("begin");
-               centerprint(self, "^1Begin!\n");
+               centerprint(self, strcat(CPID_ROUND_STARTING, "^1Begin!\n"));
 
                if(g_ca) {
                        ca_players = 0;
index 9a36546716d6dc644512e2536a1f449791be55c8..bca53cb4ddcd7b552dff576095eb0bf8ac5098b2 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("\n\n\n\n\n\n\n\n\n\n^1\n", title, "\n^3\n", campaign_longdesc[0], "\n\n^1press jump to enter the game"));
+       campaign_message = strzone(strcat("^1\n", title, "\n^3\n", campaign_longdesc[0], "\n\n^1press jump to enter the game"));
        strunzone(title);
 }
 
index 6df11cc02c97dc47111f6f914a0ccb08d4de088b..a07c2e26e8bf2ca2dc5b7689d7d1a026f2dfae3a 100644 (file)
@@ -2440,7 +2440,7 @@ void LeaveSpectatorMode()
                                bprint ("^4", self.netname, "^4 is playing now\n");
 
                        if(!autocvar_g_campaign)
-                               centerprint(self,""); // clear MOTD
+                               centerprint(self, CPID_MOTD); // clear MOTD
 
                        return;
                } else {
index 29fc297d5ef8c92e6dbfe822d6fb4aa37f280102..73914d405bcd145ee98d1f82f6c52ae1b25b9152 100644 (file)
@@ -41,8 +41,6 @@ void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad
        Net_LinkEntity(e, FALSE, 0.2, Damage_DamageInfo_SendEntity);
 }
 
-#define DAMAGE_CENTERPRINT_SPACER NEWLINES
-
 float checkrules_firstblood;
 
 float yoda;
@@ -647,7 +645,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                        if (targ.armorvalue && (deathtype == WEP_MINSTANEX) && damage)
                        {
                                targ.armorvalue -= 1;
-                               centerprint(targ, strcat(DAMAGE_CENTERPRINT_SPACER, "^3Remaining extra lives: ",ftos(targ.armorvalue)));
+                               centerprint(targ, strcat("^3Remaining extra lives: ",ftos(targ.armorvalue)));
                                damage = 0;
                                targ.hitsound += 1;
                                attacker.hitsound += 1; // TODO change this to a future specific hitsound for armor hit
@@ -659,7 +657,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                                if (targ != attacker)
                                {
                                        if ((targ.health >= 1) && (targ.classname == "player"))
-                                               centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, "Secondary fire inflicts no damage!"));
+                                               centerprint(attacker, "Secondary fire inflicts no damage!");
                                        force = '0 0 0';
                                        // keep mirrorforce
                                        attacker = targ;
@@ -896,7 +894,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
                        if(attacker.armorvalue > 0)
                        {
                                attacker.armorvalue = attacker.armorvalue - 1;
-                               centerprint(attacker, strcat(DAMAGE_CENTERPRINT_SPACER, "^3Remaining extra lives: ",ftos(attacker.armorvalue)));
+                               centerprint(attacker, strcat("^3Remaining extra lives: ",ftos(attacker.armorvalue)));
                                attacker.hitsound += 1;
                        }
                        mirrordamage = 0;
index 5a591e03532d7ab0847c1c2ec656b900abb9c485..0eea40b15c2d5a92ca120067185dbd5bf5d31394 100644 (file)
@@ -283,7 +283,7 @@ float Item_GiveTo(entity item, entity player)
                        {
                                pickedup = TRUE;
                                // play some cool sounds ;)
-                               centerprint(player, "\n");
+                               centerprint(player, CPID_MINSTA_FINDAMMO); //clear countdown
                                if (clienttype(player) == CLIENTTYPE_REAL)
                                {
                                        if(player.health <= 5)
index f9321b8dbf0fdbab6b3af8caf9b833af7add3c20..68aa07a39bc1115a896372118d08fca93537eac7 100644 (file)
@@ -484,12 +484,11 @@ void PrintWelcomeMessage(entity pl)
        {
                // TODO get rid of this too
                local string specString;
-               specString = NEWLINES;
                //if(time < game_starttime) //also show the countdown when being a spectator
                //      specString = strcat(specString, "\n\n^1Game starts in ", ftos(ceil(game_starttime - time)), " seconds^7");
                //else
                if (timeoutStatus != 0)
-                       specString = strcat(specString, "\n\n", getTimeoutText(1));
+                       specString = getTimeoutText(1);
                else
                {
                        if(self.classname == "player")
@@ -536,7 +535,7 @@ void PrintWelcomeMessage(entity pl)
        local string versionmessage;
        versionmessage = GetClientVersionMessage();
 
-       s = strcat(s, NEWLINES, "This is Xonotic ", autocvar_g_xonoticversion, "\n", versionmessage);
+       s = strcat(CPID_MOTD, "This is Xonotic ", autocvar_g_xonoticversion, "\n", versionmessage);
        s = strcat(s, "^8\n\nmatch type is ^1", gamemode_name, "^8\n");
 
        if(modifications != "")