diff options
author | Aki <nthirtyone@gmail.com> | 2016-05-20 19:57:49 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2016-05-20 19:57:49 +0200 |
commit | 4c6c37c3f67048f2dda4d6051142b0381ecaa81e (patch) | |
tree | 07acf646394e5cd77762e081e797d52bca097c4c /world.lua | |
parent | ea6a6856bfdd98524c2ec4cf52e5c926a31f9697 (diff) | |
download | roflnauts-4c6c37c3f67048f2dda4d6051142b0381ecaa81e.zip roflnauts-4c6c37c3f67048f2dda4d6051142b0381ecaa81e.tar.gz roflnauts-4c6c37c3f67048f2dda4d6051142b0381ecaa81e.tar.bz2 |
Death is more deadly now
Diffstat (limited to 'world.lua')
-rw-r--r-- | world.lua | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -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 |