Fixed server failing to start a round if there's a selected cargo spawnpoint is not inside a hull

This commit is contained in:
Regalis
2017-02-25 15:03:10 +02:00
parent 2a60f9d052
commit 12466e304e
+2 -2
View File
@@ -1035,9 +1035,9 @@ namespace Barotrauma.Networking
WayPoint cargoSpawnPos = WayPoint.GetRandom(SpawnType.Cargo, null, sub); WayPoint cargoSpawnPos = WayPoint.GetRandom(SpawnType.Cargo, null, sub);
if (cargoSpawnPos == null) if (cargoSpawnPos == null || cargoSpawnPos.CurrentHull == null)
{ {
DebugConsole.ThrowError("Couldn't spawn additional cargo (cargo spawnpoint not found)"); DebugConsole.ThrowError("Couldn't spawn additional cargo (no cargo spawnpoint inside any of the hulls)");
continue; continue;
} }