summaryrefslogtreecommitdiffhomepage
path: root/not/Hero.lua
diff options
context:
space:
mode:
Diffstat (limited to 'not/Hero.lua')
-rw-r--r--not/Hero.lua1
1 files changed, 1 insertions, 0 deletions
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