From b7dbefe71cda9f9c3521a78a9258eef1b1bc777d Mon Sep 17 00:00:00 2001 From: David Morris Date: Mon, 16 Dec 2013 23:56:07 +0000 Subject: [PATCH] Mobs now only die on encountering bullets --- entity/mob.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/entity/mob.lua b/entity/mob.lua index 8bef1d5..54231cc 100755 --- a/entity/mob.lua +++ b/entity/mob.lua @@ -34,7 +34,13 @@ function Mob:hit(other, dx, dy) self.canJump = true end - return self.health <= 0 + -- we can only die on encountering bullets + -- this should not be necessary, but seems to be :( + if other:isInstanceOf(Bullet) then + return self.health <= 0 + else + return false + end end function Mob:tick(state, collider)