]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename playerstats_waitforme to PlayerStats_GameReport_DelayMapVote
authorSamual Lenks <samual@xonotic.org>
Sun, 1 Dec 2013 02:30:09 +0000 (21:30 -0500)
committerSamual Lenks <samual@xonotic.org>
Sun, 1 Dec 2013 02:30:09 +0000 (21:30 -0500)
qcsrc/common/playerstats.qc
qcsrc/common/playerstats.qh
qcsrc/server/g_world.qc

index 8cea4f9bceec5e0fd7fd6afa42adf5d65cffdd25..8f6af5cc392b7be6001584a11327b1bc0342dbcd 100644 (file)
@@ -211,13 +211,13 @@ void PlayerStats_GameReport_Init() // initiated before InitGameplayMode so that
 {
        string uri;
        PS_GR_OUT_DB = -1;
-       playerstats_waitforme = FALSE;
+       PlayerStats_GameReport_DelayMapVote = FALSE;
        uri = autocvar_g_playerstats_uri;
        if(uri == "")
                return;
        PS_GR_OUT_DB = db_create();
        if(PS_GR_OUT_DB >= 0)
-               playerstats_waitforme = TRUE; // must wait for it at match end
+               PlayerStats_GameReport_DelayMapVote = TRUE; // must wait for it at match end
 
        serverflags |= SERVERFLAG_PLAYERSTATS;
 
@@ -264,12 +264,12 @@ void PlayerStats_GameReport_Shutdown()
        uri = autocvar_g_playerstats_uri;
        if(uri != "")
        {
-               playerstats_waitforme = TRUE;
+               PlayerStats_GameReport_DelayMapVote = TRUE;
                url_multi_fopen(uri, FILE_APPEND, PlayerStats_GameReport_Handler, world);
        }
        else
        {
-               playerstats_waitforme = FALSE;
+               PlayerStats_GameReport_DelayMapVote = FALSE;
                db_close(PS_GR_OUT_DB);
                PS_GR_OUT_DB = -1;
        }
@@ -412,7 +412,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status)
                {
                        // url_fclose has finished
                        print("Player stats written\n");
-                       playerstats_waitforme = FALSE;
+                       PlayerStats_GameReport_DelayMapVote = FALSE;
                        db_close(PS_GR_OUT_DB);
                        PS_GR_OUT_DB = -1;
                        break;
@@ -422,7 +422,7 @@ void PlayerStats_GameReport_Handler(entity fh, entity pass, float status)
                default:
                {
                        print("Player stats writing failed: ", ftos(status), "\n");
-                       playerstats_waitforme = FALSE;
+                       PlayerStats_GameReport_DelayMapVote = FALSE;
                        if(PS_GR_OUT_DB >= 0)
                        {
                                db_close(PS_GR_OUT_DB);
index e0570be342da1f40fff09a1234ca9a3550ed86ab..d381f28967ded54249eb3a196a15225d8f378dfe 100644 (file)
@@ -25,7 +25,7 @@ const string PLAYERSTATS_ACHIEVEMENT_FIRSTBLOOD = "achievement-firstblood";
 const string PLAYERSTATS_ACHIEVEMENT_FIRSTVICTIM = "achievement-firstvictim";
 
 // delay map switch until this is set
-float playerstats_waitforme;
+float PlayerStats_GameReport_DelayMapVote;
 
 // call at initialization
 void PlayerStats_GameReport_Init();
index aed68ab76f6587723859c3b11541ef4aa661f2a6..006a4f240005fb13c8fa50bf59c7923d75927027 100644 (file)
@@ -2646,8 +2646,7 @@ void MapVote_Start()
        if(mapvote_run) { return; }
 
        // don't start mapvote until after playerstats gamereport is sent
-       if(playerstats_waitforme) { return; }
-
+       if(PlayerStats_GameReport_DelayMapVote) { return; }
 
        // set up map information for mapvote
        MapInfo_Enumerate();