summaryrefslogtreecommitdiffhomepage
path: root/world.lua
diff options
context:
space:
mode:
Diffstat (limited to 'world.lua')
-rw-r--r--world.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/world.lua b/world.lua
index 57b8cd7..b01948e 100644
--- a/world.lua
+++ b/world.lua
@@ -379,6 +379,12 @@ function World.beginContact(a, b, coll)
b:getUserData():playSound(3)
end
end
+ if a:getCategory() == 3 then
+ b:getUserData():damage(a:getUserData()[2])
+ end
+ if b:getCategory() == 3 then
+ a:getUserData():damage(b:getUserData()[2])
+ end
end
-- endContact
function World.endContact(a, b, coll)