X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud.qc;h=cc8b21e74f4aac03b011fb014b18debc045d64ab;hp=15d31c16e2e52cb8f2526d211909b5820c31b439;hb=2c022461b9a9a44b84dbf8fd1b8b3063b5160141;hpb=76ab057393d10df6fc379a9f8cc67b31b7a54e4c diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 15d31c16e2..cc8b21e74f 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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(); }