mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
A*
- Improved performance by caching cost and valid/invalid neighbours.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user