From eb751807f4516201e0cc413df1f76dd2b801e81c Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 20 Jul 2019 16:53:58 +0200 Subject: [PATCH] fix(boxes): correctly load textured boxes' textures --- gamecore/modules/world/actors/utils/boxes/textured.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gamecore/modules/world/actors/utils/boxes/textured.lua b/gamecore/modules/world/actors/utils/boxes/textured.lua index 3d46c4a..9158ecd 100644 --- a/gamecore/modules/world/actors/utils/boxes/textured.lua +++ b/gamecore/modules/world/actors/utils/boxes/textured.lua @@ -27,14 +27,14 @@ local Box3D = require(cwd .. "parent") local TexturedBox = Box3D:extend() function TexturedBox:new(owner, w, h, d, topTexture, bottomTexture) - TexturedBox.super.new(self, owner, w, h, d) - local bottomTexture = bottomTexture or topTexture - self.topTexture = self.assets.texture[topTexture] - self.bottomTexture = self.assets.texture[bottomTexture] + self.topTexture = owner.assets.images[topTexture] + self.bottomTexture = owner.assets.images[bottomTexture] self.haveLine = false + + TexturedBox.super.new(self, owner, w, h, d) end function TexturedBox:drawTopTexture()