]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/waypointsprites.qc
Merge branch 'master' into samual/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / waypointsprites.qc
index dd7ae36b91fc09897bacb967633819e7cc61db34..24b200d3467d0d3378b50632ed09672a3e6cc402 100644 (file)
@@ -217,30 +217,20 @@ float spritelookupblinkvalue(string s)
 }
 vector spritelookupcolor(string s, vector def)
 {
+       if(substring(s, 0, 4) == "wpn-")
+               return (get_weaponinfo(stof(substring(s, 4, strlen(s)))).wpcolor);
+
        switch(s)
        {
                case "keycarrier-friend": return '0 1 0';
-               case "wpn-laser":         return '1 0.5 0.5';
-               case "wpn-shotgun":       return '0.5 0.25 0';
-               case "wpn-uzi":           return '1 1 0';
-               case "wpn-gl":            return '1 0 0';
-               case "wpn-electro":       return '0 0.5 1';
-               case "wpn-crylink":       return '1 0.5 1';
-               case "wpn-nex":           return '0.5 1 1';
-               case "wpn-hagar":         return '1 1 0.5';
-               case "wpn-rl":            return '1 1 0';
-               case "wpn-porto":         return '0.5 0.5 0.5';
-               case "wpn-minstanex":     return '0.5 1 1';
-               case "wpn-hookgun":       return '0 0.5 0';
-               case "wpn-fireball":      return '1 0.5 0';
-               case "wpn-hlac":          return '0 1 0';
-               case "wpn-campingrifle":  return '0.5 1 0';
-               case "wpn-minelayer":     return '0.75 1 0';
                default:                  return def;
        }
 }
 string spritelookuptext(string s)
 {
+       if(substring(s, 0, 4) == "wpn-")
+               return (get_weaponinfo(stof(substring(s, 4, strlen(s)))).message);
+
        switch(s)
        {
                case "as-push": return _("Push");
@@ -277,25 +267,10 @@ string spritelookuptext(string s)
                case "race-finish": return _("Finish");
                case "race-start": return _("Start");
                case "race-start-finish": return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
+               case "goal": return _("Goal");
                case "nb-ball": return _("Ball");
                case "ka-ball": return _("Ball");
                case "ka-ballcarrier": return _("Ball carrier");
-               case "wpn-laser": return _("Laser");
-               case "wpn-shotgun": return _("Shotgun");
-               case "wpn-uzi": return _("Machine Gun");
-               case "wpn-gl": return _("Mortar");
-               case "wpn-electro": return _("Electro");
-               case "wpn-crylink": return _("Crylink");
-               case "wpn-nex": return _("Nex");
-               case "wpn-hagar": return _("Hagar");
-               case "wpn-rl": return _("Rocket Launcher");
-               case "wpn-porto": return _("Port-O-Launch");
-               case "wpn-minstanex": return _("Minstanex");
-               case "wpn-hookgun": return _("Hook");
-               case "wpn-fireball": return _("Fireball");
-               case "wpn-hlac": return _("HLAC");
-               case "wpn-campingrifle": return _("Rifle");
-               case "wpn-minelayer": return _("Mine Layer");
                case "dom-neut": return _("Control point");
                case "dom-red": return _("Control point");
                case "dom-blue": return _("Control point");