Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nil acceleration units in FC3 export #663

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Scripts/DCS-BIOS/lib/meta_files/DCS_API_defs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ function LoCoordinatesToGeoCoordinates(x, z) end
--- @field z number
AccelerationUnit = {}

--- Returns G Load
--- @return AccelerationUnit
--- Returns G Load. May be null when the user has the Game Master slot selected.
--- @return AccelerationUnit?
function LoGetAccelerationUnits() end

--- Returns ADI pitch, band, yaw
Expand Down
3 changes: 2 additions & 1 deletion Scripts/DCS-BIOS/lib/modules/aircraft_modules/FC3.lua
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ end)
FC3:addExportHook(function()
--[[G Load]]
local plane = GetPlaneName()
gload = LoGetAccelerationUnits().y or 0
local acceleration_units = LoGetAccelerationUnits()
gload = acceleration_units and acceleration_units.y or 0
gload_bar = BarGLoad(gload) or 0

-- G LOAD
Expand Down
Loading