1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-11 21:00:41 +01:00

[mobs] Uncomment half of attack stop

- ... but only for non-explosive mobs
 - #509 , following the advice of @crabman77
This commit is contained in:
LeMagnesium 2016-10-06 20:37:20 +02:00
parent 327694b4ea
commit 7ddebddee2
No known key found for this signature in database
GPG Key ID: A54DDB5272C51E8B

View File

@ -1488,11 +1488,11 @@ minetest.register_entity(name, {
local p = self.attack:getpos() or s local p = self.attack:getpos() or s
local dist = get_distance(p, s) local dist = get_distance(p, s)
--[[ stop attacking if player or out of range -- stop attacking if player or out of range
if dist > self.view_range if (dist > self.view_range
or not self.attack or not self.attack
or not self.attack:getpos() or not self.attack:getpos()
or self.attack:get_hp() <= 0 then or self.attack:get_hp() <= 0) and not self.attack_type == "explode" then -- MFF
--print(" ** stop attacking **", dist, self.view_range) --print(" ** stop attacking **", dist, self.view_range)
self.state = "stand" self.state = "stand"
@ -1504,7 +1504,7 @@ minetest.register_entity(name, {
self.blinktimer = 0 self.blinktimer = 0
return return
end]] -- MFF(Mg|06/10/2016) #509 end
if self.attack_type == "explode" then if self.attack_type == "explode" then