From 44617778c7cebadcd6682e733d1a6bd1d817c6ec Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 25 Sep 2006 23:04:33 +0000 Subject: [PATCH] Fixed bug am40911 (round kill stats persisting for spectators) --- plugins/cstrike/statsx.sma | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/cstrike/statsx.sma b/plugins/cstrike/statsx.sma index f429a3c6..c5f3b871 100755 --- a/plugins/cstrike/statsx.sma +++ b/plugins/cstrike/statsx.sma @@ -1420,7 +1420,15 @@ kill_stats(id) // Bail out if user stats timer is non-zero, // ie function already called. if (g_fzShowUserStatsTime[id] > 0.0) + { return + } + + new team = get_user_team(id) + if (team < 1 || team > 2) + { + return + } // Flag kill stats displayed for this player. g_fzShowUserStatsTime[id] = get_gametime() @@ -1546,7 +1554,9 @@ endround_stats() id = iaPlayers[iPlayer] if (g_fzShowUserStatsTime[id] == 0.0) + { kill_stats(id) + } } g_sAwardAndScore[0] = 0