fix: only render as rainbow when explicitly defined

This commit is contained in:
James Ross 2021-01-22 17:32:16 +00:00
parent 13114721d9
commit 1cf2eda994
No known key found for this signature in database
GPG Key ID: 49E8B07166BE49AB
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ if SERVER then
CreateConVar("sbox_maxtextscreens", "1", {FCVAR_NOTIFY, FCVAR_REPLICATED})
CreateConVar("ss_call_to_home", 0, {FCVAR_NOTIFY, FCVAR_REPLICATED})
local version = "1.17.0"
local version = "1.17.1"
local function GetOS()
if system.IsLinux() then return "linux" end

View File

@ -75,7 +75,7 @@ local function Draw3D2D(ang, pos, camangle, data)
-- Position
surface.SetTextPos(data[i][POSX], data[i][POSY])
-- Rainbow
if data[i][RAINBOW] ~= 0 then
if data[i][RAINBOW] ~= nil and DATA[i][RAINBOW] ~= 0 then
for j = 1, #data[i][TEXT] do
--Color
if render_rainbow ~= 0 then