- Improved performance by caching cost and valid/invalid neighbours.
This commit is contained in:
Frank
2020-07-30 17:41:26 +02:00
parent 0d42b12658
commit cf9248ecc8
4 changed files with 152 additions and 45 deletions

View File

@@ -1535,12 +1535,6 @@ function NAVYGROUP:_FindPathToNextWaypoint()
for i,_node in ipairs(path) do
local node=_node --Core.Astar#ASTAR.Node
-- Waypoint index.
local wpindex=self:GetWaypointIndexCurrent()+i
-- ID of current waypoint.
local uid=self:GetWaypointCurrent().uid
-- Add waypoints along detour path to next waypoint.
local wp=self:AddWaypoint(node.coordinate, speed, uid)