fix: let the cam update when screen isn't active

fix the camera jumping after a transition
This commit is contained in:
Kazhnuz 2021-04-03 00:04:58 +02:00
parent 63922790e0
commit a2246f9bc7
2 changed files with 6 additions and 4 deletions

View file

@ -76,7 +76,7 @@ function Scene:updateEnd(dt)
end
function Scene:updateWorld(dt)
if ((self.world ~= nil) and (self.world.isActive) and core.screen:isActive()) then
if ((self.world ~= nil) and (self.world.isActive)) then
self.world:update(dt)
end
end

View file

@ -358,9 +358,11 @@ end
-- All update functions
function BaseWorld:update(dt)
self:updateMap(dt)
self:sendInputToPlayers(dt)
self:updateActors(dt)
if (core.screen:isActive()) then
self:updateMap(dt)
self:sendInputToPlayers(dt)
self:updateActors(dt)
end
self.cameras:update(dt)
end