Update RAT.lua

This commit is contained in:
Frank 2024-03-26 22:26:58 +01:00
parent 2205100942
commit 82f4c9d526

View File

@ -2349,6 +2349,9 @@ function RAT:_Respawn(index, lastpos, delay)
end end
end end
flightgroup:Despawn(0, true)
flightgroup:Stop()
local _departure=nil local _departure=nil
local _destination=nil local _destination=nil
local _takeoff=nil local _takeoff=nil
@ -4121,7 +4124,8 @@ function RAT:_OnEngineShutdown(EventData)
local idx=self:GetSpawnIndexFromGroup(SpawnGroup) local idx=self:GetSpawnIndexFromGroup(SpawnGroup)
local coord=SpawnGroup:GetCoordinate() local coord=SpawnGroup:GetCoordinate()
self:_Respawn(idx, coord, 3) self:_Respawn(idx, coord, 3)
end
else
-- Despawn group. -- Despawn group.
text="Event: Group "..SpawnGroup:GetName().." will be destroyed now." text="Event: Group "..SpawnGroup:GetName().." will be destroyed now."
@ -4130,6 +4134,9 @@ function RAT:_OnEngineShutdown(EventData)
end end
end
end end
end end