- 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:
Regalis
2016-04-22 17:21:34 +03:00
parent 510602623a
commit 6c538443fd
4 changed files with 18 additions and 15 deletions

View File

@@ -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 &&