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

Commit

Permalink
[mobs] Never disable the timer for exploding mobs
Browse files Browse the repository at this point in the history
 - For #509
  • Loading branch information
Lymkwi committed Oct 6, 2016
1 parent a8a95a6 commit 327694b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mods/mobs/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,7 @@ minetest.register_entity(name, {
local p = self.attack:getpos() or 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
or not self.attack
or not self.attack:getpos()
Expand All @@ -1504,7 +1504,7 @@ minetest.register_entity(name, {
self.blinktimer = 0
return
end
end]] -- MFF(Mg|06/10/2016) #509

if self.attack_type == "explode" then

Expand All @@ -1526,7 +1526,7 @@ minetest.register_entity(name, {
self.object:setyaw(yaw)
end

if dist > self.reach then
--[[if dist > self.reach then
if not self.v_start then
Expand All @@ -1550,7 +1550,7 @@ minetest.register_entity(name, {
end
set_animation(self, "run")
else
else]] -- MFF(Mg|06/10/2016) #509
set_velocity(self, 0)
self.timer = self.timer + dtime
self.blinktimer = (self.blinktimer or 0) + dtime
Expand Down Expand Up @@ -1603,7 +1603,7 @@ minetest.register_entity(name, {

return
end
end
--end

elseif self.attack_type == "dogfight"
or (self.attack_type == "dogshoot" and dist <= self.reach) then
Expand Down

1 comment on commit 327694b

@BetterToAutomateTheWorld
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done, good idea.

Please sign in to comment.