diff --git a/creatures/README.txt b/creatures/README.txt index 008708c..4dcf72b 100644 --- a/creatures/README.txt +++ b/creatures/README.txt @@ -2,7 +2,7 @@ Creatures MOB-Engine ==================== Copyright (c) 2015 BlockMen -Version: 2.0.1 +Version: 2.0.2 This mod provides an engine, that handles the base function for MOB in Minetest. diff --git a/creatures/functions.lua b/creatures/functions.lua index 56b5390..170eb6f 100644 --- a/creatures/functions.lua +++ b/creatures/functions.lua @@ -39,6 +39,7 @@ local function knockback(selfOrObject, dir, old_dir, strengh) if selfOrObject.stunned == true then selfOrObject.stunned = false if selfOrObject.can_panic == true then + selfOrObject.target = nil selfOrObject.mode = "_run" selfOrObject.modetimer = 0 end @@ -436,7 +437,7 @@ creatures.on_step = function(self, dtime) end -- search a target (1-2ms) - if not self.target and ((self.hostile and def.combat.search_enemy) or modes["follow"]) then + if not self.target and ((self.hostile and def.combat.search_enemy) or modes["follow"]) and current_mode ~= "_run" then local timer if self.hostile then timer = def.combat.search_timer or 2