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:
Frank
2022-04-03 23:59:43 +02:00
parent e49fff5028
commit 426dcff085
11 changed files with 174 additions and 170 deletions

View File

@@ -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()