From 77670d8ec06443b97c08ec66765409eb4d1177fb Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 7 Sep 2019 20:38:41 +0200 Subject: [PATCH] fix(boxes): make sure that invisible f3D boxes are really invisibles --- gamecore/modules/world/actors/utils/boxes/parent.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gamecore/modules/world/actors/utils/boxes/parent.lua b/gamecore/modules/world/actors/utils/boxes/parent.lua index 314cbab..45c570b 100644 --- a/gamecore/modules/world/actors/utils/boxes/parent.lua +++ b/gamecore/modules/world/actors/utils/boxes/parent.lua @@ -37,7 +37,11 @@ function Box3D:new(owner, w, h, d, isVisible) self.shadowSources = {} self.needRedraw = false - self.isVisible = isVisible or true + if (isVisible == nil) then + self.isVisible = true + else + self.isVisible = isVisible + end if (self.isVisible) then self:setTexture()