fix(world): don't draw unused objectlayers

This commit is contained in:
Kazhnuz 2019-07-20 10:25:25 +02:00
parent b5be7e58a3
commit 27773ad8d6
2 changed files with 3 additions and 1 deletions

View file

@ -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 - **camera:** Fix camera's drawing in other resolution mode
- **world:** Don't draw unused sti objectlayer
### Removed ### Removed
- **actor:** Remove all function related to XGravity - **actor:** Remove all function related to XGravity

View file

@ -450,7 +450,7 @@ end
function BaseWorld:drawMap(id) function BaseWorld:drawMap(id)
if self.haveMap then if self.haveMap then
for _, layer in ipairs(self.map.layers) do 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) self.map:drawLayer(layer)
end end
end end