mirror of
https://github.com/JonnyBro/beatrun.git
synced 2025-01-01 14:53: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"
|
text = speed .. " km/h"
|
||||||
local w, _ = surface.GetTextSize(text)
|
local w, _ = surface.GetTextSize(text)
|
||||||
|
|
||||||
|
w = w or 0
|
||||||
|
|
||||||
local r, g, b, a = string.ToColor(GetConVar("Beatrun_HUDTextColor"):GetString())
|
local r, g, b, a = string.ToColor(GetConVar("Beatrun_HUDTextColor"):GetString())
|
||||||
|
|
||||||
surface.SetDrawColor(255, 255, 255, 255)
|
surface.SetDrawColor(255, 255, 255, 255)
|
||||||
|
@ -267,6 +269,8 @@ function CourseHUD()
|
||||||
if timealpha > 0 then
|
if timealpha > 0 then
|
||||||
local w, _ = surface.GetTextSize(timetext)
|
local w, _ = surface.GetTextSize(timetext)
|
||||||
|
|
||||||
|
w = w or 0
|
||||||
|
|
||||||
timealpha = math.max(0, timealpha - FrameTime() * 250)
|
timealpha = math.max(0, timealpha - FrameTime() * 250)
|
||||||
timecolor.a = math.min(255, timealpha)
|
timecolor.a = math.min(255, timealpha)
|
||||||
|
|
||||||
|
@ -362,4 +366,4 @@ net.Receive("BeatrunSpawn", function()
|
||||||
if LocalPlayer().GetInfoNum then
|
if LocalPlayer().GetInfoNum then
|
||||||
StartCourse(spawntime)
|
StartCourse(spawntime)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue