Fixed takeoff problem in 2.1

This commit is contained in:
FlightControl_Master
2017-09-14 11:30:45 +02:00
parent 887faacdb1
commit 0ede10b1a2
2 changed files with 8 additions and 5 deletions

View File

@@ -1025,6 +1025,8 @@ function SPAWN:SpawnAtAirbase( Airbase, Takeoff, TakeoffAltitude ) -- R2.2
else
SpawnTemplate.units[UnitID].alt = PointVec3.y + 10
end
SpawnTemplate.units[UnitID].parking = nil
SpawnTemplate.units[UnitID].parking_id = nil
self:T( 'After Translation SpawnTemplate.units['..UnitID..'].x = ' .. SpawnTemplate.units[UnitID].x .. ', SpawnTemplate.units['..UnitID..'].y = ' .. SpawnTemplate.units[UnitID].y )
end
@@ -1036,7 +1038,8 @@ function SPAWN:SpawnAtAirbase( Airbase, Takeoff, TakeoffAltitude ) -- R2.2
SpawnTemplate.route.points[1].alt = PointVec3.y + 10
SpawnTemplate.route.points[1].airdromeId = Airbase:GetID()
end
SpawnTemplate.route.points[1].type = GROUPTEMPLATE.Takeoff[Takeoff]
SpawnTemplate.route.points[1].type = GROUPTEMPLATE.Takeoff[Takeoff][1] -- type
SpawnTemplate.route.points[1].action = GROUPTEMPLATE.Takeoff[Takeoff][2] -- action
SpawnTemplate.x = PointVec3.x
SpawnTemplate.y = PointVec3.z