X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud%2Fpanel%2Fmodicons.qc;h=bf302fdfa3f3cff6f2fcc701e269821a4a8b1f7f;hb=451e02a2857d8c671f6dcf6a0639ea7c609b3ba9;hp=c3310b25a13b8189711c8ccecf7e3957b4b17c5c;hpb=b32eb7b11a27ac13f205b13ece8e633b2e9c423c;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud/panel/modicons.qc b/qcsrc/client/hud/panel/modicons.qc index c3310b25a..bf302fdfa 100644 --- a/qcsrc/client/hud/panel/modicons.qc +++ b/qcsrc/client/hud/panel/modicons.qc @@ -283,8 +283,9 @@ void HUD_Mod_KH(vector pos, vector mySize) mod_active = 1; // keyhunt should never hide the mod icons panel // Read current state - int state = STAT(KH_KEYS); + if(!state) return; + int i, key_state; int all_keys, team1_keys, team2_keys, team3_keys, team4_keys, dropped_keys, carrying_keys; all_keys = team1_keys = team2_keys = team3_keys = team4_keys = dropped_keys = carrying_keys = 0; @@ -315,9 +316,7 @@ void HUD_Mod_KH(vector pos, vector mySize) } // Calculate slot measurements - vector slot_size; - if(all_keys == 4 && mySize.x * 0.5 < mySize.y && mySize.y * 0.5 < mySize.x) { // Quadratic arrangement @@ -347,11 +346,10 @@ void HUD_Mod_KH(vector pos, vector mySize) // Make icons blink in case of RUN HERE - float blink = 0.6 + sin(2*M_PI*time) / 2.5; // Oscillate between 0.2 and 1 - float alpha; - alpha = 1; - + float alpha = 1; if(carrying_keys) + { + float blink = 0.6 + sin(2 * M_PI * time) * 0.4; // Oscillate between 0.2 and 1 switch(myteam) { case NUM_TEAM_1: if(team1_keys == all_keys) alpha = blink; break; @@ -359,6 +357,7 @@ void HUD_Mod_KH(vector pos, vector mySize) case NUM_TEAM_3: if(team3_keys == all_keys) alpha = blink; break; case NUM_TEAM_4: if(team4_keys == all_keys) alpha = blink; break; } + } // Draw icons