summaryrefslogtreecommitdiffhomepage
path: root/world.lua
diff options
context:
space:
mode:
Diffstat (limited to 'world.lua')
-rw-r--r--world.lua20
1 files changed, 12 insertions, 8 deletions
diff --git a/world.lua b/world.lua
index 470ccb6..da89755 100644
--- a/world.lua
+++ b/world.lua
@@ -172,17 +172,21 @@ end
-- beginContact
function World.beginContact(a, b, coll)
- local x,y = coll:getNormal()
- if y == -1 then
- print(b:getUserData().name .. " is not in air")
- b:getUserData().inAir = false
- b:getUserData().jumpdouble = true
- b:getUserData():createEffect("land")
+ if a:getCategory() == 1 then
+ local x,y = coll:getNormal()
+ if y == -1 then
+ print(b:getUserData().name .. " is not in air")
+ b:getUserData().inAir = false
+ b:getUserData().jumpdouble = true
+ b:getUserData():createEffect("land")
+ end
end
end
-- endContact
function World.endContact(a, b, coll)
- print(b:getUserData().name .. " is in air")
- b:getUserData().inAir = true
+ if a:getCategory() == 1 then
+ print(b:getUserData().name .. " is in air")
+ b:getUserData().inAir = true
+ end
end \ No newline at end of file