Fixed index out of range exception when trying to determine outside collider position for a gap that's not connected to anything

This commit is contained in:
Joonas Rikkonen
2018-08-06 11:22:50 +03:00
parent e57eb739e2
commit 9052782a6c
@@ -523,7 +523,7 @@ namespace Barotrauma
simPosition = null;
normal = null;
if (IsRoomToRoom || Submarine == null || open <= 0.0f) return false;
if (IsRoomToRoom || Submarine == null || open <= 0.0f || linkedTo.Count == 0 || !(linkedTo[0] is Hull)) return false;
if (outsideColliderRaycastTimer <= 0.0f)
{