]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use a team switch for control point sprite name
authorMario <mario.mario@y7mail.com>
Sun, 14 Apr 2013 02:25:51 +0000 (12:25 +1000)
committerMario <mario.mario@y7mail.com>
Sun, 14 Apr 2013 02:25:51 +0000 (12:25 +1000)
qcsrc/server/mutators/gamemode_domination.qc

index fc1902eaa2dffc5efb1d391ea35fcc3631c37876..98b9b40dd857c5052395bd0d7b09e8d8bfb7a0df 100644 (file)
@@ -19,7 +19,7 @@ void dompoint_captured ()
 {
        entity head;
        float old_delay, old_team, real_team;
-       string msg;
+       string msg = "dom-neut";
 
        // now that the delay has expired, switch to the latest team to lay claim to this point
        head = self.owner;
@@ -76,7 +76,13 @@ void dompoint_captured ()
        self.delay = old_delay;
        self.team = old_team;
        
-       msg = strzone(strdecolorize(strcat("dom-", Team_ColorName_Lower(self.goalentity.team))));
+       switch(self.team)
+       {
+               case NUM_TEAM_1: msg = "dom-red"; break;
+               case NUM_TEAM_2: msg = "dom-blue"; break;
+               case NUM_TEAM_3: msg = "dom-yellow"; break;
+               case NUM_TEAM_4: msg = "dom-pink"; break;
+       }
 
        WaypointSprite_UpdateSprites(self.sprite, msg, "", "");