Skip to content
This repository was archived by the owner on Aug 20, 2020. It is now read-only.

Commit 7ddebdd

Browse files
committed
[mobs] Uncomment half of attack stop
- ... but only for non-explosive mobs - #509 , following the advice of @Crabman77
1 parent 327694b commit 7ddebdd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mods/mobs/api.lua

+4-4
Original file line numberDiff line numberDiff line change
@@ -1488,11 +1488,11 @@ minetest.register_entity(name, {
14881488
local p = self.attack:getpos() or s
14891489
local dist = get_distance(p, s)
14901490

1491-
--[[ stop attacking if player or out of range
1492-
if dist > self.view_range
1491+
-- stop attacking if player or out of range
1492+
if (dist > self.view_range
14931493
or not self.attack
14941494
or not self.attack:getpos()
1495-
or self.attack:get_hp() <= 0 then
1495+
or self.attack:get_hp() <= 0) and not self.attack_type == "explode" then -- MFF
14961496

14971497
--print(" ** stop attacking **", dist, self.view_range)
14981498
self.state = "stand"
@@ -1504,7 +1504,7 @@ minetest.register_entity(name, {
15041504
self.blinktimer = 0
15051505

15061506
return
1507-
end]] -- MFF(Mg|06/10/2016) #509
1507+
end
15081508

15091509
if self.attack_type == "explode" then
15101510

0 commit comments

Comments
 (0)