From 27773ad8d6f7480531281cdd22c9badcd391f3e4 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 20 Jul 2019 10:25:25 +0200 Subject: [PATCH] fix(world): don't draw unused objectlayers --- CHANGELOG.md | 2 ++ gamecore/modules/world/baseworld.lua | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 37f513e..ca741c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **camera:** Fix camera's drawing in other resolution mode +- **world:** Don't draw unused sti objectlayer + ### Removed - **actor:** Remove all function related to XGravity diff --git a/gamecore/modules/world/baseworld.lua b/gamecore/modules/world/baseworld.lua index 348ae0a..f2a7d54 100644 --- a/gamecore/modules/world/baseworld.lua +++ b/gamecore/modules/world/baseworld.lua @@ -450,7 +450,7 @@ end function BaseWorld:drawMap(id) if self.haveMap then for _, layer in ipairs(self.map.layers) do - if layer.visible and layer.opacity > 0 then + if layer.visible and layer.opacity > 0 and (layer.type == "tilelayer") then self.map:drawLayer(layer) end end