(4ca1f10d7) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev

This commit is contained in:
Joonas Rikkonen
2019-06-04 16:41:59 +03:00
parent fd8fe59688
commit 3393cb7a1b
5 changed files with 276 additions and 28 deletions
@@ -179,6 +179,10 @@ namespace Barotrauma
bool closeEnough = Vector2.DistanceSquared(Target.WorldPosition, character.WorldPosition) < CloseEnough * CloseEnough;
if (repeat)
{
if (closeEnough)
{
closeEnough = !(Target is Character) || Target is Character c && c.CurrentHull == character.CurrentHull;
}
if (closeEnough)
{
OnCompleted();