Fix config not saving session settings
This commit is contained in:
@@ -122,7 +122,6 @@ namespace Torch.Server
|
|||||||
Log.Info("Starting server.");
|
Log.Info("Starting server.");
|
||||||
MySandboxGame.ConfigDedicated = DedicatedInstance.DedicatedConfig.Model;
|
MySandboxGame.ConfigDedicated = DedicatedInstance.DedicatedConfig.Model;
|
||||||
|
|
||||||
DedicatedInstance.SaveConfig();
|
|
||||||
_uptime = Stopwatch.StartNew();
|
_uptime = Stopwatch.StartNew();
|
||||||
base.Start();
|
base.Start();
|
||||||
}
|
}
|
||||||
@@ -136,7 +135,6 @@ namespace Torch.Server
|
|||||||
base.Stop();
|
base.Stop();
|
||||||
Log.Info("Server stopped.");
|
Log.Info("Server stopped.");
|
||||||
|
|
||||||
Config.Save();
|
|
||||||
State = ServerState.Stopped;
|
State = ServerState.Stopped;
|
||||||
IsRunning = false;
|
IsRunning = false;
|
||||||
CanRun = true;
|
CanRun = true;
|
||||||
|
@@ -35,6 +35,7 @@ namespace Torch.Server.ViewModels
|
|||||||
{
|
{
|
||||||
Validate();
|
Validate();
|
||||||
|
|
||||||
|
_config.SessionSettings = _sessionSettings;
|
||||||
// Never ever
|
// Never ever
|
||||||
_config.IgnoreLastSession = true;
|
_config.IgnoreLastSession = true;
|
||||||
_config.Save(path);
|
_config.Save(path);
|
||||||
|
@@ -72,6 +72,7 @@ namespace Torch.Server
|
|||||||
|
|
||||||
private void BtnStart_Click(object sender, RoutedEventArgs e)
|
private void BtnStart_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
_server.DedicatedInstance.SaveConfig();
|
||||||
Task.Run(() => _server.Start());
|
Task.Run(() => _server.Start());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user