Skip to content

Commit

Permalink
Mobs now only die on encountering bullets
Browse files Browse the repository at this point in the history
  • Loading branch information
qlkzy committed Dec 16, 2013
1 parent c49616d commit b7dbefe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion entity/mob.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b7dbefe

Please sign in to comment.