From f21cf6d4342f43c276c4dafdaad75288ea3fb5d2 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Thu, 12 Mar 2015 21:36:10 +0100 Subject: [PATCH] Removed nil functions --- mods/mobs/api.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/mobs/api.lua b/mods/mobs/api.lua index b24bcb31..03ef7394 100755 --- a/mods/mobs/api.lua +++ b/mods/mobs/api.lua @@ -506,7 +506,7 @@ function mobs:register_mob(name, def) else self.set_velocity(self, 0) self.timer = self.timer + dtime - self.blinktimer = (self.blinktimer + dtime) or nil + self.blinktimer = (self.blinktimer or 0) + dtime if self.blinktimer > 0.2 then self.blinktimer = self.blinktimer - 0.2 if self.blinkstatus then @@ -521,7 +521,7 @@ function mobs:register_mob(name, def) pos.x = math.floor(pos.x+0.5) pos.y = math.floor(pos.y+0.5) pos.z = math.floor(pos.z+0.5) - do_tnt_physics(pos, 3) + --do_tnt_physics(pos, 3) local meta = minetest.get_meta(pos) minetest.sound_play("tnt_explode", {pos = pos,gain = 1.0,max_hear_distance = 16,}) if minetest.get_node(pos).name == "default:water_source" or minetest.get_node(pos).name == "default:water_flowing" or minetest.is_protected(pos, "tnt") then @@ -535,7 +535,7 @@ function mobs:register_mob(name, def) local np={x=pos.x+x,y=pos.y+y,z=pos.z+z} local n = minetest.get_node(np) if n.name ~= "air" and n.name ~= "default:obsidian" and n.name ~= "default:bedrock" and n.name ~= "protector:protect" then - activate_if_tnt(n.name, np, pos, 3) + --activate_if_tnt(n.name, np, pos, 3) minetest.remove_node(np) nodeupdate(np) if n.name ~= "tnt:tnt" and math.random() > 0.9 then