From: Rudolf Polzer Date: Fri, 1 Feb 2013 14:01:56 +0000 (+0100) Subject: fix typos X-Git-Tag: xonotic-v0.7.0~104 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e11a031d17d1e95071d9b2e8fe3f4466d4a3a908;p=xonotic%2Fxonotic-data.pk3dir.git fix typos --- diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 784a9821e..329fb9d4e 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -349,10 +349,10 @@ void ReadyRestart_force() if(!g_ca && !g_arena) { game_starttime += RESTART_COUNTDOWN; } // clear alivetime - FOR_EACH_CLIENTP(tmp_player) + FOR_EACH_CLIENT(tmp_player) { tmp_player.alivetime = 0; - PlayerStats_Event(p, PLAYERSTATS_ALIVETIME, -PlayerStats_Event(p, PLAYERSTATS_ALIVETIME)); + PlayerStats_Event(tmp_player, PLAYERSTATS_ALIVETIME, -PlayerStats_Event(tmp_player, PLAYERSTATS_ALIVETIME, 0)); } restart_mapalreadyrestarted = 0; // reset this var, needed when cvar sv_ready_restart_repeatable is in use diff --git a/qcsrc/server/playerstats.qc b/qcsrc/server/playerstats.qc index 24b719d87..c01a25bbd 100644 --- a/qcsrc/server/playerstats.qc +++ b/qcsrc/server/playerstats.qc @@ -145,10 +145,10 @@ void PlayerStats_AddEvent(string event_id) } } -void PlayerStats_Event(entity e, string event_id, float value) +float PlayerStats_Event(entity e, string event_id, float value) { if((e.playerstats_id == "") || playerstats_db < 0) - return; + return 0; string key; float val; @@ -156,6 +156,7 @@ void PlayerStats_Event(entity e, string event_id, float value) val = stof(db_get(playerstats_db, key)); val += value; db_put(playerstats_db, key, ftos(val)); + return val; } void PlayerStats_TeamScore(float t, string event_id, float value) // TODO: doesn't this remain unused? diff --git a/qcsrc/server/playerstats.qh b/qcsrc/server/playerstats.qh index f3806d50d..445d6f31c 100644 --- a/qcsrc/server/playerstats.qh +++ b/qcsrc/server/playerstats.qh @@ -38,7 +38,7 @@ void PlayerStats_AddTeam(float t); void PlayerStats_AddEvent(string event_id); // call on each event to track, or at player disconnect OR match end for "global stuff" -void PlayerStats_Event(entity e, string event_id, float value); +float PlayerStats_Event(entity e, string event_id, float value); // add a team score void PlayerStats_TeamScore(float t, string event_id, float value);