]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/waypointsprites.qc
Merge branch 'master' into MaidenBeast/translation_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / waypointsprites.qc
index 8ea4ec8d82b51cddfb398e1870b60d33d0f71422..3e83e45bcae4d144c462050eac1c5dcf6f6242f4 100644 (file)
@@ -18,6 +18,7 @@ float waypointsprite_distancefadescale;
 float waypointsprite_distancefadedistance;
 float waypointsprite_alpha;
 
+.float helpme;
 .float rule;
 .string netname; // primary picture
 .string netname2; // secondary picture
@@ -40,6 +41,7 @@ float SPRITE_HEALTHBAR_BORDER = 2;
 float SPRITE_HEALTHBAR_BORDERALPHA = 1;
 float SPRITE_HEALTHBAR_HEALTHALPHA = 0.5;
 float SPRITE_ARROW_SCALE = 1.0;
+float SPRITE_HELPME_BLINK = 2;
 
 void drawrotpic(vector org, float rot, string pic, vector sz, vector hotspot, vector rgb, float a, float f)
 {
@@ -213,6 +215,7 @@ float spritelookupblinkvalue(string s)
                case "item-shueld":      return 2;
                case "item-fuelregen":   return 2;
                case "item-jetpack":     return 2;
+               case "tagged-target":    return 2;
                default:                 return 1;
        }
 }
@@ -429,11 +432,16 @@ void Draw_WaypointSprite()
        if(rgb == '0 0 0')
        {
                self.teamradar_color = '1 0 1';
-               print(sprintf("WARNING: sprite of name %s has no color, using pink so you notice it\n")); 
+               print(sprintf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage)); 
        }
 
        if(time - floor(time) > 0.5)
-               a *= spritelookupblinkvalue(spriteimage);
+       {
+               if(self.helpme && time < self.helpme)
+                       a *= SPRITE_HELPME_BLINK;
+               else
+                       a *= spritelookupblinkvalue(spriteimage);
+       }
 
        if(a > 1)
        {
@@ -548,6 +556,8 @@ void Draw_WaypointSprite()
        
        string txt;
        txt = spritelookuptext(spriteimage);
+       if(self.helpme && time < self.helpme)
+               txt = sprintf(_("%s needing help!"), txt);
        if(autocvar_g_waypointsprite_uppercase)
                txt = strtoupper(txt);
 
@@ -690,6 +700,9 @@ void Ent_WaypointSprite()
                self.teamradar_color_x = ReadByte() / 255.0;
                self.teamradar_color_y = ReadByte() / 255.0;
                self.teamradar_color_z = ReadByte() / 255.0;
+               self.helpme = ReadByte() * 0.1;
+               if(self.helpme > 0)
+                       self.helpme += servertime;
        }
 
        InterpolateOrigin_Note();