From a2246f9bc7c1f680e09682f7bf22c0fcf2a11a50 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 3 Apr 2021 00:04:58 +0200 Subject: [PATCH] fix: let the cam update when screen isn't active fix the camera jumping after a transition --- sonic-radiance.love/core/modules/scenes.lua | 2 +- sonic-radiance.love/core/modules/world/baseworld.lua | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sonic-radiance.love/core/modules/scenes.lua b/sonic-radiance.love/core/modules/scenes.lua index 83c9306..5ec2741 100644 --- a/sonic-radiance.love/core/modules/scenes.lua +++ b/sonic-radiance.love/core/modules/scenes.lua @@ -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 diff --git a/sonic-radiance.love/core/modules/world/baseworld.lua b/sonic-radiance.love/core/modules/world/baseworld.lua index 1fd1334..b4f85fa 100644 --- a/sonic-radiance.love/core/modules/world/baseworld.lua +++ b/sonic-radiance.love/core/modules/world/baseworld.lua @@ -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