]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix typos
authorRudolf Polzer <divverent@xonotic.org>
Fri, 1 Feb 2013 14:01:56 +0000 (15:01 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 1 Feb 2013 14:01:56 +0000 (15:01 +0100)
qcsrc/server/command/vote.qc
qcsrc/server/playerstats.qc
qcsrc/server/playerstats.qh

index 784a9821e07472e2957c692cf8bcf36c4c6908c1..329fb9d4ef98c1a4d8d4ee0c30b8b15e9625f701 100644 (file)
@@ -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
index 24b719d878df6bf66a5e61a29050474bb4f670d8..c01a25bbdc8228807ab8602cbd83b8aeaa2dfbb8 100644 (file)
@@ -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?
index f3806d50df917fe39a165663fd62fa3f0937578c..445d6f31cc66028fe2e318e66363dc8f6fa23f96 100644 (file)
@@ -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);