- characters aren't teleported through gaps if a wall doesn't have a hole there
- characters aren't teleported outside until they're far enough from hulls (prevents them from "jumping" outside as they're teleported partially inside the body of the sub) - arms are mirrored/flipped when turning in water
This commit is contained in:
@@ -450,6 +450,13 @@ namespace Barotrauma
|
||||
foreach (Gap gap in Gap.GapList)
|
||||
{
|
||||
if (gap.Open == 0.0f || gap.IsRoomToRoom) continue;
|
||||
|
||||
if (gap.ConnectedWall != null)
|
||||
{
|
||||
int sectionIndex = gap.ConnectedWall.FindSectionIndex(gap.Position);
|
||||
if (sectionIndex > -1 && !gap.ConnectedWall.SectionBodyDisabled(sectionIndex)) continue;
|
||||
}
|
||||
|
||||
if (gap.isHorizontal)
|
||||
{
|
||||
if (targetPos.Y < gap.WorldRect.Y && targetPos.Y > gap.WorldRect.Y - gap.WorldRect.Height &&
|
||||
|
||||
Reference in New Issue
Block a user