fix: let the cam update when screen isn't active
fix the camera jumping after a transition
This commit is contained in:
parent
63922790e0
commit
a2246f9bc7
2 changed files with 6 additions and 4 deletions
|
@ -76,7 +76,7 @@ function Scene:updateEnd(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Scene:updateWorld(dt)
|
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)
|
self.world:update(dt)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -358,9 +358,11 @@ end
|
||||||
-- All update functions
|
-- All update functions
|
||||||
|
|
||||||
function BaseWorld:update(dt)
|
function BaseWorld:update(dt)
|
||||||
self:updateMap(dt)
|
if (core.screen:isActive()) then
|
||||||
self:sendInputToPlayers(dt)
|
self:updateMap(dt)
|
||||||
self:updateActors(dt)
|
self:sendInputToPlayers(dt)
|
||||||
|
self:updateActors(dt)
|
||||||
|
end
|
||||||
self.cameras:update(dt)
|
self.cameras:update(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue