Lots and lots of updates, mainly involving spectators (waypoints are now not shown...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / hud.qc
index 15d31c1..cc8b21e 100644 (file)
@@ -4327,10 +4327,9 @@ void HUD_Mod_KH(vector pos, vector mySize)
 float kaball_prevstatus; // last remembered status
 float kaball_statuschange_time; // time when the status changed
 
-void HUD_Mod_Keepaway_Reset(void)
-{
-       kaball_prevstatus = kaball_statuschange_time = 0;
-}
+// we don't need to reset for keepaway since it immediately 
+// autocorrects prevstatus as to if the player has the ball or not
+
 void HUD_Mod_Keepaway(vector pos, vector mySize)
 {
        mod_active = 1; // keepaway should always show the mod HUD
@@ -4343,12 +4342,14 @@ void HUD_Mod_Keepaway(vector pos, vector mySize)
        float stat_items = getstati(STAT_ITEMS);
        float kaball = (stat_items/IT_KEY1) & 1;
        
-       if (kaball != kaball_prevstatus)
+       if(kaball != kaball_prevstatus)
        {
                kaball_statuschange_time = time;
                kaball_prevstatus = kaball;
        }
        
+       // todo: Fix the sizing with the expanding image
+       
        float kaball_statuschange_elapsedtime = time - kaball_statuschange_time;
        float f = bound(0, kaball_statuschange_elapsedtime*2, 1);
        
@@ -5083,8 +5084,6 @@ void HUD_Reset (void)
        // reset gametype specific icons
        if(gametype == GAME_KEYHUNT)
                HUD_Mod_KH_Reset();
-       else if(gametype == GAME_KEEPAWAY)
-               HUD_Mod_Keepaway_Reset();
        else if(gametype == GAME_CTF)
                HUD_Mod_CTF_Reset();
 }