Disable fall damage for tree monster

pull/4/head
PilzAdam 2013-04-29 13:59:23 +02:00
parent b5b378fb4b
commit 6494782f5a
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@ function mobs:register_mob(name, def)
light_damage = def.light_damage,
water_damage = def.water_damage,
lava_damage = def.lava_damage,
disable_fall_damage = def.disable_fall_damage,
drops = def.drops,
armor = def.armor,
drawtype = def.drawtype,
@ -125,7 +126,7 @@ function mobs:register_mob(name, def)
self.object:setacceleration({x=0, y=-10, z=0})
end
if self.object:getvelocity().y == 0 then
if self.disable_fall_damage and self.object:getvelocity().y == 0 then
if not self.old_y then
self.old_y = self.object:getpos().y
else

View File

@ -139,6 +139,7 @@ mobs:register_mob("mobs:tree_monster", {
water_damage = 1,
lava_damage = 5,
light_damage = 2,
disable_fall_damage = true,
attack_type = "dogfight",
animation = {
speed_normal = 15,