AI Reachable system (#1342)

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2020-07-11 23:09:37 +10:00
committed by GitHub
parent 347b4b2893
commit 51d08e8b05
22 changed files with 1337 additions and 80 deletions

View File

@@ -178,6 +178,17 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
return newChunk;
}
/// <summary>
/// Get the entity's tile position, then get the corresponding node
/// </summary>
/// <param name="entity"></param>
/// <returns></returns>
public PathfindingNode GetNode(IEntity entity)
{
var tile = _mapManager.GetGrid(entity.Transform.GridID).GetTileRef(entity.Transform.GridPosition);
return GetNode(tile);
}
/// <summary>
/// Return the corresponding PathfindingNode for this tile
/// </summary>