From: Samual Lenks Date: Sun, 1 Dec 2013 02:30:09 +0000 (-0500) Subject: Rename playerstats_waitforme to PlayerStats_GameReport_DelayMapVote X-Git-Tag: xonotic-v0.8.0~139^2~1^2~97 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3c441dcb095e2f7b487d669bfeccbc8dc4545990;p=xonotic%2Fxonotic-data.pk3dir.git Rename playerstats_waitforme to PlayerStats_GameReport_DelayMapVote --- diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index 8cea4f9bc..8f6af5cc3 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -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); diff --git a/qcsrc/common/playerstats.qh b/qcsrc/common/playerstats.qh index e0570be34..d381f2896 100644 --- a/qcsrc/common/playerstats.qh +++ b/qcsrc/common/playerstats.qh @@ -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(); diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index aed68ab76..006a4f240 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -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();