From c8534e0bb85fe93b76ad32415bb0581d4771dd9b Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 7 Jan 2020 19:57:51 +0100 Subject: [PATCH] Make sure g_campaign is always reset to 0 on disconnection (without relying on the "Start Multiplayer!" button of the menu) --- qcsrc/server/campaign.qc | 3 +++ 1 file changed, 3 insertions(+) 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)); -- 2.39.2