From ca3d736e84022f8a2a716cd187101d9733740a01 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 17 Aug 2011 16:20:15 +0200 Subject: [PATCH] PLAYERSTATS_JOINS: also set that for players that are DEAD during end of the game (bad bug) --- qcsrc/server/playerstats.qc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/server/playerstats.qc b/qcsrc/server/playerstats.qc index c691d542b..85899c28b 100644 --- a/qcsrc/server/playerstats.qc +++ b/qcsrc/server/playerstats.qc @@ -284,10 +284,10 @@ void PlayerStats_AddGlobalInfo(entity p) // add global info! if(p.alivetime) + { PlayerStats_Event(p, PLAYERSTATS_ALIVETIME, time - p.alivetime); - - if(p.alivetime) - PlayerStats_Event(p, PLAYERSTATS_ALIVETIME, time - p.alivetime); + p.alivetime = 0; + } db_put(playerstats_db, sprintf("%s:_netname", p.playerstats_id), ftos(p.playerid)); @@ -297,7 +297,7 @@ void PlayerStats_AddGlobalInfo(entity p) if(teamplay) db_put(playerstats_db, sprintf("%s:_team", p.playerstats_id), ftos(p.team)); - if(p.alivetime > 0) + if(stof(db_get(playerstats_db, sprintf("%d:%s", p.playerstats_id, PLAYERSTATS_ALIVETIME))) > 0) PlayerStats_Event(p, PLAYERSTATS_JOINS, 1); strunzone(p.playerstats_id); -- 2.39.2