This commit is contained in:
Frank
2021-02-14 00:19:03 +01:00
parent 74e84a73dd
commit 084499fa0e
4 changed files with 148 additions and 29 deletions

View File

@@ -575,6 +575,21 @@ function ARMYGROUP:onafterSpawned(From, Event, To)
end
--- On before "UpdateRoute" event.
-- @param #ARMYGROUP self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #number n Waypoint number. Default is next waypoint.
-- @param #number Speed Speed in knots. Default cruise speed.
-- @param #number Formation Formation of the group.
function ARMYGROUP:onbeforeUpdateRoute(From, Event, To, n, Speed, Formation)
if self:IsWaiting() then
return false
end
return true
end
--- On after "UpdateRoute" event.
-- @param #ARMYGROUP self
-- @param #string From From state.
@@ -1028,6 +1043,10 @@ end
-- @param #number Formation Formation.
function ARMYGROUP:onafterCruise(From, Event, To, Speed, Formation)
-- Not waiting anymore.
self.Twaiting=nil
self.dTwait=nil
self:__UpdateRoute(-1, nil, Speed, Formation)
end