From 7a560cee7e7f0620656a63e91f05fbe898919246 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 4 Apr 2017 13:11:33 +0200 Subject: Kek, never commit late night. Fail statement back to not.Hero.update --- not/Hero.lua | 1 + not/PhysicalBody.lua | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/not/Hero.lua b/not/Hero.lua index e28c2ef..cddf864 100644 --- a/not/Hero.lua +++ b/not/Hero.lua @@ -86,6 +86,7 @@ end -- TODO: Explode this function (method, kek), move controler-related parts to `not.Player`, physics parts to `not.PhysicalBody`. function Hero:update (dt) PhysicalBody.update(self, dt) + if self.body:isDestroyed() then return end -- locals local x, y = self:getLinearVelocity() local isDown = Controller.isDown diff --git a/not/PhysicalBody.lua b/not/PhysicalBody.lua index a9ac63b..e9625fa 100644 --- a/not/PhysicalBody.lua +++ b/not/PhysicalBody.lua @@ -69,7 +69,6 @@ end -- Update of `PhysicalBody`. function PhysicalBody:update (dt) Sprite.update(self, dt) - if self.body:isDestroyed() then return end end -- Draw of `PhysicalBody`. -- cgit v1.1