mirror of
https://github.com/JonnyBro/beatrun.git
synced 2025-01-31 12:07:27 +05:00
Fix for random lua error in multiplayer
Merge pull request #42 from RedyRT/master
This commit is contained in:
commit
8699efe670
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