(fc63971e1) Implement disabling the enemy ai. Fix enablecrewai command.

This commit is contained in:
Joonas Rikkonen
2019-04-11 18:25:29 +03:00
parent 50317e3626
commit 21cc6001d4
2 changed files with 21 additions and 4 deletions
@@ -12,6 +12,8 @@ namespace Barotrauma
{
partial class EnemyAIController : AIController
{
public static bool DisableEnemyAI;
class WallTarget
{
public Vector2 Position;
@@ -249,7 +251,7 @@ namespace Barotrauma
}
}
public TargetingPriority GetTargetingPriority(string targetTag)
private TargetingPriority GetTargetingPriority(string targetTag)
{
if (targetingPriorities.TryGetValue(targetTag, out TargetingPriority priority))
{
@@ -267,6 +269,7 @@ namespace Barotrauma
public override void Update(float deltaTime)
{
if (DisableEnemyAI) { return; }
bool ignorePlatforms = (-Character.AnimController.TargetMovement.Y > Math.Abs(Character.AnimController.TargetMovement.X));
if (steeringManager is IndoorsSteeringManager)