Fixed DISPATCHER issues with TakeoffFromRunway

This commit is contained in:
FlightControl_Master
2017-09-22 11:08:35 +02:00
parent d77cbff3f8
commit 0df4b5fd37
9 changed files with 119 additions and 22 deletions

View File

@@ -1109,8 +1109,18 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude ) -- R2.2
SpawnTemplate.x = PointVec3.x
SpawnTemplate.y = PointVec3.z
local GroupSpawned = self:SpawnWithIndex( self.SpawnIndex )
-- When spawned in the air, we need to generate a Takeoff Event
if Takeoff == GROUP.Takeoff.Air then
for UnitID, UnitSpawned in pairs( GroupSpawned:GetUnits() ) do
SCHEDULER:New( nil, BASE.CreateEventTakeoff, { GroupSpawned, timer.getTime(), UnitSpawned:GetDCSObject() } , 1 )
end
end
return self:SpawnWithIndex( self.SpawnIndex )
return GroupSpawned
end
end