From 6c487d44312dd96fb37825ea3fc7354f108fdfb6 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 7 Apr 2018 19:10:14 +0200 Subject: Now uses getFixtures instead of deprecated getFixtureList --- not/Hero.lua | 2 +- not/PhysicalBody.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/not/Hero.lua b/not/Hero.lua index 14e32f1..3037837 100644 --- a/not/Hero.lua +++ b/not/Hero.lua @@ -114,7 +114,7 @@ function Hero:update (dt) -- Cooldown self.punchCooldown = self.punchCooldown - dt if not self.body:isDestroyed() then -- TODO: This is weird - for _,fixture in pairs(self.body:getFixtureList()) do -- TODO: getFixtures from `PhysicalBody` or similar. + for _,fixture in pairs(self.body:getFixtures()) do -- TODO: getFixtures from `PhysicalBody` or similar. if fixture:getUserData() ~= self then fixture:setUserData({fixture:getUserData()[1] - dt, fixture:getUserData()[2]}) if fixture:getUserData()[1] < 0 then diff --git a/not/PhysicalBody.lua b/not/PhysicalBody.lua index df9992e..0fb969f 100644 --- a/not/PhysicalBody.lua +++ b/not/PhysicalBody.lua @@ -65,7 +65,7 @@ end function PhysicalBody:draw (debug) PhysicalBody.__super.draw(self, debug) if debug then - for _,fixture in pairs(self.body:getFixtureList()) do + for _,fixture in pairs(self.body:getFixtures()) do local category = fixture:getCategory() -- TODO: Fixture drawing of PhysicalBodies could take activity into account in every case. if category == 1 then -- cgit v1.1