NPC Warnings cleanup (#36189)
* NPC Warnings cleanup * Reverting unnecessary changes * Reverting unnecessary changes, missed * Using entity GetGrid override instead
This commit is contained in:
@@ -86,7 +86,7 @@ public sealed partial class MoveToOperator : HTNOperator, IHtnConditionalShutdow
|
||||
return (false, null);
|
||||
|
||||
if (!_entManager.TryGetComponent<MapGridComponent>(xform.GridUid, out var ownerGrid) ||
|
||||
!_entManager.TryGetComponent<MapGridComponent>(targetCoordinates.GetGridUid(_entManager), out var targetGrid))
|
||||
!_entManager.TryGetComponent<MapGridComponent>(_transform.GetGrid(targetCoordinates), out var targetGrid))
|
||||
{
|
||||
return (false, null);
|
||||
}
|
||||
@@ -155,8 +155,8 @@ public sealed partial class MoveToOperator : HTNOperator, IHtnConditionalShutdow
|
||||
{
|
||||
if (blackboard.TryGetValue<EntityCoordinates>(NPCBlackboard.OwnerCoordinates, out var coordinates, _entManager))
|
||||
{
|
||||
var mapCoords = coordinates.ToMap(_entManager, _transform);
|
||||
_steering.PrunePath(uid, mapCoords, targetCoordinates.ToMapPos(_entManager, _transform) - mapCoords.Position, result.Path);
|
||||
var mapCoords = _transform.ToMapCoordinates(coordinates);
|
||||
_steering.PrunePath(uid, mapCoords, _transform.ToMapCoordinates(targetCoordinates).Position - mapCoords.Position, result.Path);
|
||||
}
|
||||
|
||||
comp.CurrentPath = new Queue<PathPoly>(result.Path);
|
||||
|
||||
Reference in New Issue
Block a user