Remove NPC IEntityManager resolves (#12648)

This commit is contained in:
metalgearsloth
2022-11-19 08:07:52 +11:00
committed by GitHub
parent c58204255f
commit b749d0d275
16 changed files with 46 additions and 44 deletions

View File

@@ -16,13 +16,13 @@ public sealed class CoordinatesNotInRangePrecondition : HTNPrecondition
public override bool IsMet(NPCBlackboard blackboard)
{
if (!blackboard.TryGetValue<EntityCoordinates>(NPCBlackboard.OwnerCoordinates, out var coordinates))
if (!blackboard.TryGetValue<EntityCoordinates>(NPCBlackboard.OwnerCoordinates, out var coordinates, _entManager))
return false;
if (!blackboard.TryGetValue<EntityCoordinates>(TargetKey, out var target))
if (!blackboard.TryGetValue<EntityCoordinates>(TargetKey, out var target, _entManager))
return false;
return !coordinates.InRange(_entManager, target, blackboard.GetValueOrDefault<float>(RangeKey));
return !coordinates.InRange(_entManager, target, blackboard.GetValueOrDefault<float>(RangeKey, _entManager));
}
}