mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 09:48:52 +00:00
refactor: less calculations
This commit is contained in:
@@ -1015,7 +1015,7 @@ function ESX.Game.Utils.DrawText3D(coords, text, size, font)
|
||||
local fov = (1 / GetGameplayCamFov()) * 100
|
||||
scale = scale * fov
|
||||
|
||||
SetTextScale(0.0 * scale, 0.55 * scale)
|
||||
SetTextScale(0.0, 0.55 * scale)
|
||||
SetTextFont(font)
|
||||
SetTextProportional(1)
|
||||
SetTextColour(255, 255, 255, 215)
|
||||
|
||||
@@ -31,8 +31,9 @@ end
|
||||
|
||||
local function StartDBSync()
|
||||
CreateThread(function()
|
||||
local interval <const> = 10 * 60 * 1000
|
||||
while true do
|
||||
Wait(10 * 60 * 1000)
|
||||
Wait(interval)
|
||||
Core.SavePlayers()
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -147,6 +147,7 @@ function DeleteSkinCam()
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
local customPI <const> = math.pi / 180.0
|
||||
while true do
|
||||
local sleep = 1500
|
||||
|
||||
@@ -164,7 +165,7 @@ CreateThread(function()
|
||||
local playerPed = PlayerPedId()
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
|
||||
local angle = heading * math.pi / 180.0
|
||||
local angle = heading * customPI
|
||||
local theta = {
|
||||
x = math.cos(angle),
|
||||
y = math.sin(angle)
|
||||
@@ -182,7 +183,7 @@ CreateThread(function()
|
||||
angleToLook = angleToLook + 360
|
||||
end
|
||||
|
||||
angleToLook = angleToLook * math.pi / 180.0
|
||||
angleToLook = angleToLook * customPI
|
||||
local thetaToLook = {
|
||||
x = math.cos(angleToLook),
|
||||
y = math.sin(angleToLook)
|
||||
|
||||
Reference in New Issue
Block a user