- fixed AICharacters being updated even if they're disabled
- enemies can spot targets from further away if they've previously spotted the target - physics bodies are immediately moved to the correct position if they're really far (instead of lerping)
This commit is contained in:
@@ -307,7 +307,7 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
if (lerp)
|
||||
if (lerp && Vector2.Distance(targetPosition, body.Position)<10.0f)
|
||||
{
|
||||
offsetFromTargetPos = targetPosition - (body.Position - offsetFromTargetPos);
|
||||
prevPosition = targetPosition;
|
||||
|
||||
Reference in New Issue
Block a user