WAREHOUSE

- Runway destroyed event only triggered if it was operational
This commit is contained in:
Frank
2023-06-07 09:03:01 +02:00
parent 0c376aec63
commit 8ce371f898
2 changed files with 9 additions and 1 deletions

View File

@@ -6671,7 +6671,13 @@ function WAREHOUSE:_OnEventCrashOrDead(EventData)
self:Destroyed()
end
if self.airbase and self.airbasename and self.airbasename==EventData.IniUnitName then
self:RunwayDestroyed()
if self:IsRunwayOperational() then
-- Trigger RunwayDestroyed event (only if it is not destroyed already)
self:RunwayDestroyed()
else
-- Reset the time stamp.
self.runwaydestroyed=timer.getAbsTime()
end
end
end