diff --git a/api.lua b/api.lua index 2834460..f348442 100644 --- a/api.lua +++ b/api.lua @@ -11,7 +11,7 @@ local use_mc2 = minetest.get_modpath("mcl_core") -- Global mobs = { mod = "redo", - version = "20230816", + version = "20230817", translate = S, invis = minetest.global_exists("invisibility") and invisibility or {}, node_snow = minetest.registered_aliases["mapgen_snow"] @@ -3071,7 +3071,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage) -- only alert members of same mob and assigned helper if ent.group_attack == true and ent.state ~= "attack" - and not (is_player(hitter) and ent.owner == name) + and not (is_player(hitter) and ent.owner == hitter_name) and (ent.name == self.name or ent.name == self.group_helper) then ent:do_attack(hitter) end diff --git a/api.txt b/api.txt index 8d7c645..3f104f3 100644 --- a/api.txt +++ b/api.txt @@ -346,6 +346,7 @@ Internal Variables The mob api also has some preset variables and functions that it will remember for each mob. + 'self._cmi_is_mob' Used to determine wether entity is a mobs redo mob when True. 'self.health' contains current health of mob (cannot exceed self.hp_max) 'self.texture_list' contains list of all mob textures