"Shifting" entity IDs to prevent them from overlapping between different subs, loading another submarine now works without crashing

This commit is contained in:
Regalis
2016-06-10 20:53:35 +03:00
parent 7349cdd310
commit ee2d817e6b
14 changed files with 83 additions and 44 deletions

View File

@@ -296,12 +296,12 @@ namespace Barotrauma
case "edit":
if (commands.Length>1)
{
Submarine.Load(string.Join(" ", commands.Skip(1)));
Submarine.Load(string.Join(" ", commands.Skip(1)), true);
}
GameMain.EditMapScreen.Select();
break;
case "test":
Submarine.Load("aegir mark ii");
Submarine.Load("aegir mark ii", true);
GameMain.DebugDraw = true;
GameMain.LightManager.LosEnabled = false;
GameMain.EditMapScreen.Select();
@@ -450,10 +450,10 @@ namespace Barotrauma
case "load":
if (commands.Length < 2) break;
Submarine.Load(string.Join(" ", commands.Skip(1)));
Submarine.Load(string.Join(" ", commands.Skip(1)), true);
break;
case "cleansub":
for (int i = MapEntity.mapEntityList.Count-1; i>=0; i--)
for (int i = MapEntity.mapEntityList.Count - 1; i >= 0; i--)
{
MapEntity me = MapEntity.mapEntityList[i];