]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/keepaway/cl_keepaway.qc
Consolidates a few of the networked stats to free up some slots. Also removes an...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / keepaway / cl_keepaway.qc
index b2d08742854e6cf04f2f68e6cbc346c5b9e77934..a643ff2dcab19e9605e3da7a9a602f94dc79d07c 100644 (file)
@@ -1,5 +1,6 @@
 #include "cl_keepaway.qh"
 
+#include <client/draw.qh>
 #include <client/hud/panel/modicons.qh>
 
 // Keepaway HUD mod icon
@@ -13,13 +14,9 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
 {
        mod_active = 1; // keepaway should always show the mod HUD
 
-       float BLINK_FACTOR = 0.15;
-       float BLINK_BASE = 0.85;
-       float BLINK_FREQ = 5;
-       float kaball_alpha = BLINK_BASE + BLINK_FACTOR * cos(time * BLINK_FREQ);
+       float kaball_alpha = blink(0.85, 0.15, 5);
 
-       int stat_items = STAT(ITEMS);
-       int kaball = (stat_items/IT_KEY1) & 1;
+       int kaball = (STAT(OBJECTIVE_STATUS) & KA_CARRYING);
 
        if(kaball != kaball_prevstatus)
        {