fix world checkpoint loading
This commit is contained in:
@@ -128,7 +128,15 @@ namespace Torch.Server.Managers
|
||||
return;
|
||||
}
|
||||
|
||||
SelectWorld(DedicatedConfig.LoadWorld ?? DedicatedConfig.Worlds.First().WorldPath, false);
|
||||
var worldPath = DedicatedConfig.LoadWorld;
|
||||
|
||||
if (worldPath == null)
|
||||
worldPath = DedicatedConfig.Worlds.First().WorldPath;
|
||||
else
|
||||
// make sure we won't end up with a file path when we expect it to be a directory
|
||||
worldPath = Path.EndsInDirectorySeparator(worldPath) ? worldPath : Path.GetDirectoryName(worldPath);
|
||||
|
||||
SelectWorld(worldPath, false);
|
||||
|
||||
_instanceLoaded?.Invoke(DedicatedConfig);
|
||||
}
|
||||
|
Reference in New Issue
Block a user