From be64dffe9e3354fda6220a1b25251e1664cd71cc Mon Sep 17 00:00:00 2001 From: Aki Date: Mon, 3 Apr 2017 21:50:40 +0200 Subject: Testing if body isn't destroyed in PhysicalBody's update --- not/PhysicalBody.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'not/PhysicalBody.lua') diff --git a/not/PhysicalBody.lua b/not/PhysicalBody.lua index 7b774f2..a7abcc0 100644 --- a/not/PhysicalBody.lua +++ b/not/PhysicalBody.lua @@ -50,6 +50,7 @@ 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