(c8c4b0d92) Require that the bot is in the same hull as the goto target, before calling it done.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user