mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 13:23:02 +05:00
Update Checkpoints.lua
Fixes lua errors when starting multiplayer
This commit is contained in:
parent
35521bb0c8
commit
9ce9336d15
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue