From 8689cdc247a3fd16125524aac04eb054c398084c Mon Sep 17 00:00:00 2001 From: Nico <122193236+Nico8340@users.noreply.github.com> Date: Fri, 24 May 2024 01:43:48 +0200 Subject: [PATCH] Speedometer: Preventing pointer overflow (#485) --- [gameplay]/speedometer/client.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[gameplay]/speedometer/client.lua b/[gameplay]/speedometer/client.lua index 433af8e61..fa3c4bae9 100644 --- a/[gameplay]/speedometer/client.lua +++ b/[gameplay]/speedometer/client.lua @@ -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