From 38edee61a34c8fc5ceb44df90f4e4b17edb76526 Mon Sep 17 00:00:00 2001 From: Bull Date: Tue, 14 Jun 2016 15:41:39 -0400 Subject: [PATCH] fixed GetDimensions clientside error --- lua/safespace/sh_dynamic.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/safespace/sh_dynamic.lua b/lua/safespace/sh_dynamic.lua index 5a1ccb8..7f23fdf 100644 --- a/lua/safespace/sh_dynamic.lua +++ b/lua/safespace/sh_dynamic.lua @@ -192,6 +192,8 @@ function SafeSpace:GetInteriorPortalDimensions(ent) end function SafeSpace:GetExteriorLighting(ent) + if not ent then return end + if not ent:GetDimensions() then return end local dim=ent:GetDimensions() local idim=ent.interior:GetDimensions() local portal=ent:GetPortalDimensions() @@ -385,4 +387,4 @@ function SafeSpace:MakeInterior(ent) ent.Fallback={pos=Vector((-dim.width/2)+dim.size,0,((-dim.height-dim.size)/2))} self:Init(ent) -end \ No newline at end of file +end