Fixed crashing when attempting to generate hulls with the "autohull" command when there are no walls or doors in the sub.
This commit is contained in:
@@ -1082,6 +1082,12 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wallPoints.Count < 4)
|
||||||
|
{
|
||||||
|
DebugConsole.ThrowError("Generating hulls for the submarine failed. Not enough wall structures to generate hulls.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
min = wallPoints[0];
|
min = wallPoints[0];
|
||||||
max = wallPoints[0];
|
max = wallPoints[0];
|
||||||
for (int i = 0; i < wallPoints.Count; i++)
|
for (int i = 0; i < wallPoints.Count; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user