Fix config not saving session settings

This commit is contained in:
John Gross
2018-04-03 11:17:19 -07:00
parent b2bf0229ed
commit d59ef20f72
3 changed files with 3 additions and 3 deletions

View File

@@ -121,8 +121,7 @@ namespace Torch.Server
_hasRun = true;
Log.Info("Starting server.");
MySandboxGame.ConfigDedicated = DedicatedInstance.DedicatedConfig.Model;
DedicatedInstance.SaveConfig();
_uptime = Stopwatch.StartNew();
base.Start();
}
@@ -136,7 +135,6 @@ namespace Torch.Server
base.Stop();
Log.Info("Server stopped.");
Config.Save();
State = ServerState.Stopped;
IsRunning = false;
CanRun = true;

View File

@@ -35,6 +35,7 @@ namespace Torch.Server.ViewModels
{
Validate();
_config.SessionSettings = _sessionSettings;
// Never ever
_config.IgnoreLastSession = true;
_config.Save(path);

View File

@@ -72,6 +72,7 @@ namespace Torch.Server
private void BtnStart_Click(object sender, RoutedEventArgs e)
{
_server.DedicatedInstance.SaveConfig();
Task.Run(() => _server.Start());
}