mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-02 09:07:27 +00:00
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:
co-authored by
Metal Gear Sloth
parent
405a610009
commit
a77f219515
-8
@@ -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