From: terencehill Date: Fri, 14 Oct 2022 20:52:52 +0000 (+0200) Subject: Properly set serverflags's flags X-Git-Tag: xonotic-v0.8.6~326 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6676cb666692a7d4a10e29e23599a1b3d2f3ef58;p=xonotic%2Fxonotic-data.pk3dir.git Properly set serverflags's flags --- diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index feaa9f865..a60a9de13 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -12,6 +12,7 @@ const int CVAR_NOTIFY = BIT(1); const int CVAR_READONLY = BIT(2); // server flags +// NOTE: the engine doesn't clear serverflags on map change (gotomap) const int SERVERFLAG_ALLOW_FULLBRIGHT = BIT(0); const int SERVERFLAG_TEAMPLAY = BIT(1); const int SERVERFLAG_PLAYERSTATS = BIT(2); diff --git a/qcsrc/common/playerstats.qc b/qcsrc/common/playerstats.qc index e83305886..17c76461f 100644 --- a/qcsrc/common/playerstats.qc +++ b/qcsrc/common/playerstats.qc @@ -278,6 +278,9 @@ void PlayerStats_GameReport(bool finished) void PlayerStats_GameReport_Init() // initiated before InitGameplayMode so that scores are added properly { + serverflags &= ~SERVERFLAG_PLAYERSTATS; + serverflags &= ~SERVERFLAG_PLAYERSTATS_CUSTOM; + if(autocvar_g_playerstats_gamereport_uri == "") { return; } PS_GR_OUT_DB = db_create(); diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index f9e7ad16c..4334cb422 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -2090,6 +2090,7 @@ void readplayerstartcvars() void readlevelcvars() { + serverflags &= ~SERVERFLAG_ALLOW_FULLBRIGHT; if(cvar("sv_allow_fullbright")) serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;