X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fwaypointsprites.qc;h=327ad0442d46688694013f1dacc0746141341d78;hb=695f1b7bc0b0acc3caa6aa15357538283ea099a8;hp=3b5deca87134d8a4438e54a33fd76938a0bd0d05;hpb=0068e05a7894e43425cbe6328e5ec45e83e07380;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/waypointsprites.qc b/qcsrc/client/waypointsprites.qc index 3b5deca87..327ad0442 100644 --- a/qcsrc/client/waypointsprites.qc +++ b/qcsrc/client/waypointsprites.qc @@ -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) { @@ -433,7 +435,9 @@ void Draw_WaypointSprite() print(sprintf("WARNING: sprite of name %s has no color, using pink so you notice it\n", spriteimage)); } - if(time - floor(time) > 0.5) + if(self.helpme && time < self.helpme) + a *= SPRITE_HELPME_BLINK; + else if(time - floor(time) > 0.5) a *= spritelookupblinkvalue(spriteimage); if(a > 1) @@ -549,6 +553,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); @@ -691,6 +697,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();