Update FlightGroup.lua

- fixed bug that mission does not exist
This commit is contained in:
Frank 2023-01-01 09:27:05 +01:00
parent c8d9377dbb
commit fe01c6196e

View File

@ -3779,14 +3779,7 @@ function FLIGHTGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Altitud
local wpnumber=self:GetWaypointIndexAfterID(AfterWaypointWithID)
-- Speed in knots.
if not Speed or Speed < 10 then
local mission = self:GetMissionCurrent() -- Ops.Auftrag#AUFTRAG
local speed = mission.missionSpeed
Speed = speed or self:GetSpeedCruise()
end
--Speed=Speed or self:GetSpeedCruise()
Speed=Speed or self:GetSpeedCruise()
-- Alt type default is barometric (ASL). For helos we use radar (AGL).
local alttype=COORDINATE.WaypointAltType.BARO