From: terencehill Date: Tue, 7 Jan 2020 18:57:51 +0000 (+0100) Subject: Make sure g_campaign is always reset to 0 on disconnection (without relying on the... X-Git-Tag: xonotic-v0.8.5~1105^2~36 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c8534e0bb85fe93b76ad32415bb0581d4771dd9b;p=xonotic%2Fxonotic-data.pk3dir.git Make sure g_campaign is always reset to 0 on disconnection (without relying on the "Start Multiplayer!" button of the menu) --- diff --git a/qcsrc/server/campaign.qc b/qcsrc/server/campaign.qc index 6fdb6d339..5c26da9ed 100644 --- a/qcsrc/server/campaign.qc +++ b/qcsrc/server/campaign.qc @@ -129,6 +129,9 @@ void CampaignPreInit() cvar_set("skill", ftos(baseskill)); cvar_set("bot_number", ftos(campaign_bots[0])); #else + // since g_campaign is already set to 1 by the menu when starting a campaign level, we first need + // to set it back to 0 before settemping it to 1 so it'll be correctly restored to 0 on disconnection + cvar_set("g_campaign", "0"); cvar_settemp("g_campaign", "1"); cvar_settemp("g_dm", "0"); cvar_settemp("skill", ftos(baseskill));