From: Rudolf Polzer Date: Sun, 19 Jun 2011 16:25:56 +0000 (+0200) Subject: also do a lookup for the color value to allow overrides X-Git-Tag: xonotic-v0.5.0~199^2~14^2~2^2~5 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=a2355ecd27ceaf4de66bce0bdfc78579254a7ece also do a lookup for the color value to allow overrides --- diff --git a/qcsrc/client/waypointsprites.qc b/qcsrc/client/waypointsprites.qc index ff51083956..d3dd4f7ece 100644 --- a/qcsrc/client/waypointsprites.qc +++ b/qcsrc/client/waypointsprites.qc @@ -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);