]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
also don't save campaign progress when winning the whole campaign by levelwarp
authorRudolf Polzer <divVerent@xonotic.org>
Tue, 13 Sep 2011 07:57:57 +0000 (09:57 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Tue, 13 Sep 2011 07:57:57 +0000 (09:57 +0200)
qcsrc/server/campaign.qc

index 34345cdb653efc19f4a890a7c09d35c5a54a27cc..c64716d9e2134517db182084a82a6ce611cd74ac 100644 (file)
@@ -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))
                {