Minor A* optimisations (#1335)
* Add some extra comments * Remove the redundant closedTiles variable * Rename some variables to better match the common naming schemes Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -55,19 +55,11 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
|
||||
gScores.Add(mapManager.GetGrid(tile.GridIndex).LocalToWorld(tileGrid).Position, score);
|
||||
}
|
||||
|
||||
var closedTiles = new List<Vector2>();
|
||||
foreach (var tile in routeDebug.ClosedTiles)
|
||||
{
|
||||
var tileGrid = mapManager.GetGrid(tile.GridIndex).GridTileToLocal(tile.GridIndices);
|
||||
closedTiles.Add(mapManager.GetGrid(tile.GridIndex).LocalToWorld(tileGrid).Position);
|
||||
}
|
||||
|
||||
var systemMessage = new SharedAiDebug.AStarRouteMessage(
|
||||
routeDebug.EntityUid,
|
||||
route,
|
||||
cameFrom,
|
||||
gScores,
|
||||
closedTiles,
|
||||
routeDebug.TimeTaken
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user