Update Checkpoints.lua

Fixes lua errors when starting multiplayer
This commit is contained in:
RedyRT 2023-07-28 19:04:41 +03:00 committed by GitHub
parent 35521bb0c8
commit 9ce9336d15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -246,6 +246,8 @@ function CourseHUD()
text = speed .. " km/h"
local w, _ = surface.GetTextSize(text)
w = w or 0
local r, g, b, a = string.ToColor(GetConVar("Beatrun_HUDTextColor"):GetString())
surface.SetDrawColor(255, 255, 255, 255)
@ -267,6 +269,8 @@ function CourseHUD()
if timealpha > 0 then
local w, _ = surface.GetTextSize(timetext)
w = w or 0
timealpha = math.max(0, timealpha - FrameTime() * 250)
timecolor.a = math.min(255, timealpha)
@ -362,4 +366,4 @@ net.Receive("BeatrunSpawn", function()
if LocalPlayer().GetInfoNum then
StartCourse(spawntime)
end
end)
end)