- fixed exception in GetSubsToLeaveBehind if the round ends when none of the subs is at an exit

- water surface is clamped above the bottom of the hull
- character names don't overlap with health bars
This commit is contained in:
Regalis
2016-10-09 18:20:32 +03:00
parent e7e51fbe0c
commit ef9dce9a0d
3 changed files with 20 additions and 16 deletions
@@ -241,17 +241,19 @@ namespace Barotrauma
{
isRunning = false;
if (subsToLeaveBehind == null || leavingSub == null)
{
DebugConsole.ThrowError("Leaving submarine not selected -> selecting the closest one");
leavingSub = GetLeavingSub();
subsToLeaveBehind = GetSubsToLeaveBehind(leavingSub);
}
bool success = CrewManager.characters.Any(c => !c.IsDead);
if (success)
{
if (subsToLeaveBehind == null || leavingSub == null)
{
DebugConsole.ThrowError("Leaving submarine not selected -> selecting the closest one");
leavingSub = GetLeavingSub();
subsToLeaveBehind = GetSubsToLeaveBehind(leavingSub);
}
}
GameMain.GameSession.EndShift("");