mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
RANGE v1.2 and other changes
RANGE: -Optimized performance. Bombs are now only tracked if the player is within a certain distance of the range. CONTROLLABLE: - Added speed unit to @param description. Sometimes it was unclear if speed needs to be given in m/s or km/h. - Fixed some default speed and conversions. COORDINATE: - Cleaned up some speed unit stuff. - Reintroduced PathOnRoad function to contain the full path. Useful as interface to DCS API function. - Fixed some default speed and conversions. AI_CARGO_APC: Speed is not fixed any more but set to 50% of the max speed a given unit can move at.
This commit is contained in:
@@ -2434,16 +2434,18 @@ function ARTY:_Move(group, ToCoord, Speed, OnRoad)
|
||||
-- Route group on road if requested.
|
||||
if OnRoad then
|
||||
|
||||
-- Path on road (only first and last points)
|
||||
local _first=cpini:GetClosestPointToRoad()
|
||||
local _last=ToCoord:GetClosestPointToRoad()
|
||||
local _onroad=_first:GetPathOnRoad(_last)
|
||||
|
||||
-- Points on road.
|
||||
for i=1,#_onroad do
|
||||
path[#path+1]=_onroad[i]:WaypointGround(Speed, "On road")
|
||||
task[#task+1]=group:TaskFunction("ARTY._PassingWaypoint", self, #path-1, false)
|
||||
end
|
||||
|
||||
-- First point on road.
|
||||
path[#path+1]=_first:WaypointGround(Speed, "On road")
|
||||
task[#task+1]=group:TaskFunction("ARTY._PassingWaypoint", self, #path-1, false)
|
||||
|
||||
-- Last point on road.
|
||||
path[#path+1]=_last:WaypointGround(Speed, "On road")
|
||||
task[#task+1]=group:TaskFunction("ARTY._PassingWaypoint", self, #path-1, false)
|
||||
|
||||
end
|
||||
|
||||
-- Last waypoint at ToCoord.
|
||||
|
||||
Reference in New Issue
Block a user