summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2018-04-07 19:10:14 +0200
committerAki <nthirtyone@gmail.com>2018-04-07 19:10:14 +0200
commit6c487d44312dd96fb37825ea3fc7354f108fdfb6 (patch)
treea143847c7b8b3e9daff936108eee17b3ce85eb9e
parent2e88eed328b7c561cbce8c3ae8faebc694a3983e (diff)
downloadroflnauts-6c487d44312dd96fb37825ea3fc7354f108fdfb6.zip
roflnauts-6c487d44312dd96fb37825ea3fc7354f108fdfb6.tar.gz
roflnauts-6c487d44312dd96fb37825ea3fc7354f108fdfb6.tar.bz2
Now uses getFixtures instead of deprecated getFixtureList
-rw-r--r--not/Hero.lua2
-rw-r--r--not/PhysicalBody.lua2
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