From: Rudolf Polzer Date: Tue, 13 Sep 2011 07:57:57 +0000 (+0200) Subject: also don't save campaign progress when winning the whole campaign by levelwarp X-Git-Tag: xonotic-v0.6.0~40^2~141^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c3c05b0b47d766c863df29f4d2ab38176662e444;p=xonotic%2Fxonotic-data.pk3dir.git also don't save campaign progress when winning the whole campaign by levelwarp --- diff --git a/qcsrc/server/campaign.qc b/qcsrc/server/campaign.qc index 34345cdb6..c64716d9e 100644 --- a/qcsrc/server/campaign.qc +++ b/qcsrc/server/campaign.qc @@ -219,10 +219,13 @@ void CampaignPreIntermission() if(campaign_entries < 2) { // I have won - savevar = strcat("g_campaign", campaign_name, "_won"); - CampaignSaveCvar(savevar, 1); - // advance level (for menu to show it right) - CampaignSaveCvar(campaign_index_var, campaign_level + 1); + if(campaign_level == cvar_normal(campaign_index_var)) + { + savevar = strcat("g_campaign", campaign_name, "_won"); + CampaignSaveCvar(savevar, 1); + // advance level (for menu to show it right) + CampaignSaveCvar(campaign_index_var, campaign_level + 1); + } } else if(campaign_level == cvar_normal(campaign_index_var)) {