"Shifting" entity IDs to prevent them from overlapping between different subs, loading another submarine now works without crashing
This commit is contained in:
@@ -9,7 +9,7 @@ namespace Barotrauma
|
||||
|
||||
public static void StartTutorial(TutorialType tutorialType)
|
||||
{
|
||||
Submarine.Load("Content/Map/TutorialSub.sub", "");
|
||||
Submarine.Load("Content/Map/TutorialSub.sub", "", true);
|
||||
|
||||
|
||||
tutorialType.Initialize();
|
||||
|
||||
@@ -125,7 +125,10 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
if (reloadSub || Submarine.MainSub != submarine) submarine.Load();
|
||||
if (reloadSub || Submarine.MainSub != submarine) submarine.Load(true);
|
||||
|
||||
//var secondSub = new Submarine(submarine.FilePath, submarine.MD5Hash.Hash);
|
||||
//secondSub.Load(false);
|
||||
|
||||
if (level != null)
|
||||
{
|
||||
@@ -133,6 +136,8 @@ namespace Barotrauma
|
||||
|
||||
submarine.SetPosition(level.StartPosition - new Vector2(0.0f, 2000.0f));
|
||||
|
||||
//secondSub.SetPosition(level.EndPosition - new Vector2(0.0f, 2000.0f));
|
||||
|
||||
GameMain.GameScreen.BackgroundCreatureManager.SpawnSprites(80);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user