GameMain throws an exception immediately if loading the game fails (instead of closing the loading screen and waiting for the inevitable crash)
This commit is contained in:
@@ -181,16 +181,16 @@ namespace Barotrauma
|
|||||||
|
|
||||||
ConvertUnits.SetDisplayUnitToSimUnitRatio(Physics.DisplayToSimRation);
|
ConvertUnits.SetDisplayUnitToSimUnitRatio(Physics.DisplayToSimRation);
|
||||||
|
|
||||||
spriteBatch = new SpriteBatch(base.GraphicsDevice);
|
spriteBatch = new SpriteBatch(GraphicsDevice);
|
||||||
TextureLoader.Init(base.GraphicsDevice);
|
TextureLoader.Init(GraphicsDevice);
|
||||||
|
|
||||||
loadingScreenOpen = true;
|
loadingScreenOpen = true;
|
||||||
TitleScreen = new LoadingScreen(base.GraphicsDevice);
|
TitleScreen = new LoadingScreen(GraphicsDevice);
|
||||||
|
|
||||||
loadingCoroutine = CoroutineManager.StartCoroutine(Load());
|
loadingCoroutine = CoroutineManager.StartCoroutine(Load());
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<object> Load()
|
private IEnumerable<object> Load()
|
||||||
{
|
{
|
||||||
GUI.GraphicsDevice = base.GraphicsDevice;
|
GUI.GraphicsDevice = base.GraphicsDevice;
|
||||||
GUI.Init(Content);
|
GUI.Init(Content);
|
||||||
@@ -320,10 +320,7 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (!hasLoaded && !CoroutineManager.IsCoroutineRunning(loadingCoroutine))
|
if (!hasLoaded && !CoroutineManager.IsCoroutineRunning(loadingCoroutine))
|
||||||
{
|
{
|
||||||
DebugConsole.ThrowError("Loading was interrupted due to an error");
|
throw new Exception("Loading was interrupted due to an error");
|
||||||
loadingScreenOpen = false;
|
|
||||||
loadingCoroutine = null;
|
|
||||||
hasLoaded = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (hasLoaded)
|
else if (hasLoaded)
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ namespace Barotrauma.Items.Components
|
|||||||
", Cooling rate: " + (int)coolingRate +
|
", Cooling rate: " + (int)coolingRate +
|
||||||
", Cooling rate: " + coolingRate +
|
", Cooling rate: " + coolingRate +
|
||||||
", Shutdown temp: " + shutDownTemp +
|
", Shutdown temp: " + shutDownTemp +
|
||||||
(autoTemp ? "Autotemp ON" : "Autotemp OFF"),
|
(autoTemp ? ", Autotemp ON" : ", Autotemp OFF"),
|
||||||
ServerLog.MessageType.ItemInteraction);
|
ServerLog.MessageType.ItemInteraction);
|
||||||
|
|
||||||
nextServerLogWriteTime = null;
|
nextServerLogWriteTime = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user