Merge pull request #1607 from FlightControl-Master/FF/MasterDevel

DATABASE
This commit is contained in:
Frank 2021-09-29 09:22:41 +02:00 committed by GitHub
commit 147eeb05f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -136,7 +136,7 @@ function DATABASE:New()
self:_RegisterGroupsAndUnits()
self:_RegisterClients()
self:_RegisterStatics()
self:_RegisterAirbases()
--self:_RegisterAirbases()
--self:_RegisterPlayers()
self.UNITS_Position = 0

View File

@ -18,6 +18,7 @@ _DATABASE:_RegisterCargos()
--- Register zones.
_DATABASE:_RegisterZones()
_DATABASE:_RegisterAirbases()
--- Check if os etc is available.
BASE:I("Checking de-sanitization of os, io and lfs:")

View File

@ -547,6 +547,13 @@ function AIRBASE:Register(AirbaseName)
self.isHelipad=true
elseif self.category==Airbase.Category.SHIP then
self.isShip=true
-- DCS bug: Oil rigs and gas platforms have category=2 (ship). Also they cannot be retrieved by coalition.getStaticObjects()
if self.descriptors.typeName=="Oil rig" or self.descriptors.typeName=="Ga" then
self.isHelipad=true
self.isShip=false
self.category=Airbase.Category.HELIPAD
_DATABASE:AddStatic(AirbaseName)
end
else
self:E("ERROR: Unknown airbase category!")
end