From: Rudolf Polzer Date: Wed, 17 Aug 2011 14:20:15 +0000 (+0200) Subject: PLAYERSTATS_JOINS: also set that for players that are DEAD during end of the game... X-Git-Tag: xonotic-v0.5.0~134 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ca3d736e84022f8a2a716cd187101d9733740a01;p=xonotic%2Fxonotic-data.pk3dir.git PLAYERSTATS_JOINS: also set that for players that are DEAD during end of the game (bad bug) --- 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);