Skip to content

Commit 21d1b8c

Browse files
authored
Better protection
1 parent cfd4014 commit 21d1b8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/fpp/server/antispam.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FPP.AntiSpam = FPP.AntiSpam or {}
44
function FPP.AntiSpam.GhostFreeze(ent, phys)
55
ent:SetRenderMode(RENDERMODE_TRANSCOLOR)
66
ent:DrawShadow(false)
7-
ent.OldColor = ent.OldColor or ent:GetColor()
7+
ent.OldColor = IsColor(ent.OldColor) or ent:GetColor()
88
ent.StartPos = ent:GetPos()
99
ent:SetColor(Color(ent.OldColor.r, ent.OldColor.g, ent.OldColor.b, ent.OldColor.a - 155))
1010

@@ -23,7 +23,7 @@ function FPP.UnGhost(ply, ent)
2323
ent:DrawShadow(true)
2424
if ent.OldCollisionGroup then ent:SetCollisionGroup(ent.OldCollisionGroup) ent.OldCollisionGroup = nil end
2525

26-
if ent.OldColor then
26+
if IsColor(ent.OldColor) then
2727
ent:SetColor(Color(ent.OldColor.r, ent.OldColor.g, ent.OldColor.b, ent.OldColor.a))
2828
end
2929
ent.OldColor = nil

0 commit comments

Comments
 (0)