]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make all superweapon waypoints blink
authorterencehill <piuntn@gmail.com>
Tue, 28 Jul 2015 21:20:01 +0000 (23:20 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 28 Jul 2015 21:20:01 +0000 (23:20 +0200)
qcsrc/client/waypointsprites.qc

index b4d5e53925917a8bd4be053c92f40d37547fb01d..28da5278d079644bb304f7569c2d01b062d32b1d 100644 (file)
@@ -166,6 +166,10 @@ vector drawspritetext(vector o, float ang, float minwidth, vector rgb, float a,
 
 float spritelookupblinkvalue(string s)
 {
+       if(substring(s, 0, 4) == "wpn-")
+       if(get_weaponinfo(stof(substring(s, 4, strlen(s)))).spawnflags & WEP_FLAG_SUPERWEAPON)
+               return 2;
+
        switch(s)
        {
                case "ons-cp-atck-neut": return 2;
@@ -182,9 +186,6 @@ float spritelookupblinkvalue(string s)
                case "item-shield":      return 2;
                case "item-fuelregen":   return 2;
                case "item-jetpack":     return 2;
-               case "wpn-fireball":     return 2; // superweapon
-               case "wpn-minstanex":    return 2; // superweapon
-               case "wpn-porto":        return 2; // superweapon
                case "tagged-target":    return 2;
                default:                 return 1;
        }