From 4d4197d99bd2635471598951b52af8177432954d Mon Sep 17 00:00:00 2001 From: FruitieX Date: Fri, 12 Nov 2010 08:45:09 +0200 Subject: [PATCH] i think terencehill meant that to be a continue instead of break, also why this killnotify_times == -1 stuff, it prevents e.g. a script that shows you a history of recent events. Calculating a here really won't take much time, so I'd rather leave this optimization out. :) --- qcsrc/client/hud.qc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 22fd92493c..dae75c8636 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -2622,7 +2622,7 @@ void HUD_KillNotify_Push(string attacker, string victim, float actiontype, float --kn_index; if (kn_index == -1) kn_index = KN_MAX_ENTRIES-1; - killnotify_times[kn_index] = time; // -1 indicates the message is deleted + killnotify_times[kn_index] = time; killnotify_deathtype[kn_index] = wpn; killnotify_actiontype[kn_index] = actiontype; if(killnotify_attackers[kn_index]) @@ -3148,9 +3148,6 @@ void HUD_Notify (void) if (j == KN_MAX_ENTRIES) j = 0; - if (killnotify_times[j] == -1) - break; - if(killnotify_times[j] + when > time) a = 1; else if(fadetime) @@ -3158,14 +3155,12 @@ void HUD_Notify (void) a = bound(0, (killnotify_times[j] + when + fadetime - time) / fadetime, 1); if(!a) { - killnotify_times[j] = -1; - break; + continue; } } else { - killnotify_times[j] = -1; - break; + continue; } s = ""; -- 2.39.2