From fb2929f13d51ae264fca99b254358078ca1346fd Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Tue, 8 Sep 2015 19:02:53 +0100 Subject: [PATCH] Tidy Code --- api.lua | 2 +- dungeonmaster.lua | 4 ++-- mese_monster.lua | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api.lua b/api.lua index 97a2659..277b03c 100644 --- a/api.lua +++ b/api.lua @@ -1478,7 +1478,7 @@ function mobs:register_arrow(name, def) end local engage = 10 - (self.velocity / 2) -- clear entity before arrow becomes active - local node = minetest.get_node_or_nil(self.object:getpos()) + local node = minetest.get_node_or_nil(pos) if node then node = node.name else node = "air" end if self.hit_node diff --git a/dungeonmaster.lua b/dungeonmaster.lua index 612b5ce..9cb9e88 100644 --- a/dungeonmaster.lua +++ b/dungeonmaster.lua @@ -70,14 +70,14 @@ mobs:register_arrow("mobs:fireball", { player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 8}, - }, 0) + }, nil) end, hit_mob = function(self, player) player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 8}, - }, 0) + }, nil) end, -- node hit, bursts into flame diff --git a/mese_monster.lua b/mese_monster.lua index 58c0136..df65e6b 100644 --- a/mese_monster.lua +++ b/mese_monster.lua @@ -68,14 +68,14 @@ mobs:register_arrow("mobs:mese_arrow", { player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 2}, - }, 0) + }, nil) end, hit_mob = function(self, player) player:punch(self.object, 1.0, { full_punch_interval = 1.0, damage_groups = {fleshy = 2}, - }, 0) + }, nil) end, hit_node = function(self, pos, node)