]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
also do a lookup for the color value to allow overrides
authorRudolf Polzer <divVerent@xonotic.org>
Sun, 19 Jun 2011 16:25:56 +0000 (18:25 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Sun, 19 Jun 2011 16:25:56 +0000 (18:25 +0200)
qcsrc/client/waypointsprites.qc

index ff510839567fee2ffa0c059d76d093fbdb8ce0ee..d3dd4f7ece93155dada8f8d190961a7de13188ff 100644 (file)
@@ -209,6 +209,14 @@ float spritelookupblinkvalue(string s)
                default:                 return 1;
        }
 }
+vector spritelookupcolor(string s, vector def)
+{
+       switch(s)
+       {
+               case "keycarrier-friend": return '0 1 0';
+               default:                  return def;
+       }
+}
 string spritelookuptext(string s)
 {
        switch(s)
@@ -409,6 +417,7 @@ void Draw_WaypointSprite()
 
        vector rgb;
        rgb = self.teamradar_color;
+       rgb = spritelookupcolor(spriteimage, rgb);
 
        if(time - floor(time) > 0.5)
                a *= spritelookupblinkvalue(spriteimage);