Skip to content
Merged
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
10 changes: 2 additions & 8 deletions client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1049,12 +1049,6 @@ CreateThread(function()
end
end)

-- Compass
function round(num, numDecimalPlaces)
local mult = 10 ^ (numDecimalPlaces or 0)
return math.floor(num + 0.5 * mult)
end

local prevBaseplateStats = { nil, nil, nil, nil, nil, nil, nil }

local function updateBaseplateHud(data)
Expand Down Expand Up @@ -1109,9 +1103,9 @@ CreateThread(function()
local player = PlayerPedId()
local camRot = GetGameplayCamRot(0)
if Menu.isCompassFollowChecked then
heading = tostring(round(360.0 - ((camRot.z + 360.0) % 360.0)))
heading = tostring(QBCore.Shared.Round(360.0 - ((camRot.z + 360.0) % 360.0)))
else
heading = tostring(round(360.0 - GetEntityHeading(player)))
heading = tostring(QBCore.Shared.Round(360.0 - GetEntityHeading(player)))
end
if heading == '360' then heading = '0' end
if heading ~= lastHeading then
Expand Down
Loading