Skip to content

Commit 84c5c2a

Browse files
committed
Fix challenge mode button
1 parent 56f8cd5 commit 84c5c2a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

xcom2-launcher/xcom2-launcher/Forms/MainForm.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,9 @@ private void Reset()
226226
//RefreshModList();
227227
}
228228

229-
private void Save(bool WotC, bool disableMods = false)
229+
private void Save(bool WotC)
230230
{
231-
XCOM2.SaveChanges(Settings, WotC, disableMods);
231+
XCOM2.SaveChanges(Settings, WotC, ChallengeMode);
232232
Settings.SaveFile("settings.json");
233233
}
234234

@@ -274,13 +274,16 @@ private void RunWotC()
274274
Close();
275275
}
276276

277+
private bool ChallengeMode = false;
278+
277279
private void RunChallengeMode()
278280
{
279281
_updateWorker.CancelAsync();
280282
Settings.Instance.LastLaunchedWotC = true;
281-
Save(true, true);
283+
ChallengeMode = true;
284+
Save(true);
282285

283-
XCOM2.RunWotC(Settings.GamePath, Settings.Arguments.Replace("-allowConsole", ""));
286+
XCOM2.RunWotC(Settings.GamePath, Settings.Arguments.ToLower().Replace("-allowconsole", ""));
284287

285288
if (Settings.CloseAfterLaunch)
286289
Close();

0 commit comments

Comments
 (0)