NPC Warnings cleanup (#36189)

* NPC Warnings cleanup

* Reverting unnecessary changes

* Reverting unnecessary changes, missed

* Using entity GetGrid override instead
This commit is contained in:
J
2025-04-03 00:12:25 +00:00
committed by GitHub
parent 7f781e7bda
commit 7e4cf87820
3 changed files with 6 additions and 10 deletions

View File

@@ -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);