player slots on carriers are unable to be slotted into
jtoppins opened this issue · 0 comments
Problem
Spawns on carriers are unable to be slotted into even when a proper airbase asset has been defined.
Analysis
This appears to be an issue with the way the airbase ID is discovered in the Player asset, specifically the function airbaseId
. It appears for carriers DCS stores the airbase id differently, where as with an airbase and a plane the airbase id is stored in the first point of the route for the group(grp.route.points[1].airdromeId
). When the unit is a helicopter the table element is 'helopadId'. It appears with carriers (aka. ships) all spawns are treated as helipads and thus the unit id for the aircraft carrier can be obtained as follows; grp.route.points[1].helipadId
. It also appears that there is a linkUnit
entry as well that also references the unitId.
This all makes for a very confusing process for figuring out which table element contains the airbase id for a given unit. Since it seems helipadId
is not only used for helicopter groups a tiered search for the airbase id can be done with the search order being; airdromeId
, helipadId
, linkUnit