WallAttackPos isn't reset when updating EnemyAIController targets if the target doesn't change
This commit is contained in:
@@ -369,7 +369,7 @@ namespace Barotrauma
|
||||
//sight/hearing range
|
||||
public void UpdateTargets(Character character)
|
||||
{
|
||||
wallAttackPos = Vector2.Zero;
|
||||
var prevAiTarget = selectedAiTarget;
|
||||
|
||||
selectedAiTarget = null;
|
||||
selectedTargetMemory = null;
|
||||
@@ -457,6 +457,11 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedAiTarget != prevAiTarget)
|
||||
{
|
||||
wallAttackPos = Vector2.Zero;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//find the targetMemory that corresponds to some AItarget or create if there isn't one yet
|
||||
|
||||
Reference in New Issue
Block a user