Skip to content

Commit

Permalink
Speedometer: Preventing pointer overflow (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico8340 authored May 23, 2024
1 parent d45d2d0 commit 8689cdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion [gameplay]/speedometer/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function drawSpeedo()
local speed = (velx ^ 2 + vely ^ 2 + velz ^ 2) ^ (0.5)

dxDrawRelativeImage(0.66, 0.61, 0.33, 0.49, "images/disc.png")
dxDrawRelativeImage(0.7825, 0.61, 0.2, 0.46, "images/needle.png", -146 + (speed * 180))
dxDrawRelativeImage(0.7825, 0.61, 0.2, 0.46, "images/needle.png", -146 + (speed >= 1.47 and 265 or speed * 180))
end

local isSpeedoShown = false
Expand Down

0 comments on commit 8689cdc

Please sign in to comment.