mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
OPS
FLIGHTGROUP - Improved homebase for spawned units - Enabled helo inAir check due to DCS bug that inAir returns true when spawned at airbase or farp SET_ZONE - Added DrawZone() function ARMYGROUP - Improved EngageTarget() function AUFTRAG - ARMORATTACK is not falling back to GROUNDATTACK
This commit is contained in:
@@ -1201,7 +1201,7 @@ function FLIGHTGROUP:onafterElementSpawned(From, Event, To, Element)
|
||||
-- Set element status.
|
||||
self:_UpdateStatus(Element, OPSGROUP.ElementStatus.SPAWNED)
|
||||
|
||||
if Element.unit:InAir(true) then
|
||||
if Element.unit:InAir(not self.isHelo) then -- Setting check because of problems with helos dynamically spawned where inAir WRONGLY returned true if spawned at an airbase or farp!
|
||||
-- Trigger ElementAirborne event. Add a little delay because spawn is also delayed!
|
||||
self:__ElementAirborne(0.11, Element)
|
||||
else
|
||||
@@ -1531,6 +1531,12 @@ function FLIGHTGROUP:onafterParking(From, Event, To)
|
||||
|
||||
-- Set current airbase.
|
||||
self.currbase=airbase
|
||||
|
||||
-- Set homebase to current airbase if not defined yet.
|
||||
-- This is necessary, e.g, when flights are spawned at an airbase because they do not have a takeoff waypoint.
|
||||
if not self.homebase then
|
||||
self.homebase=airbase
|
||||
end
|
||||
|
||||
-- Parking time stamp.
|
||||
self.Tparking=timer.getAbsTime()
|
||||
|
||||
Reference in New Issue
Block a user