Compare commits

..

2 Commits

Author SHA1 Message Date
44030f041c Merge remote-tracking branch 'refs/remotes/origin/master' for several fixeds
* allows old way to get boolean value, for tnt
* backported Override builtin item entity the portable way
* another fix of nil for check on mobs
2024-04-18 17:18:37 -04:00
362abd49fb mods - mobs - another fix stop mob attacking if mobs attack other mobs and player
* another check nil of position when there is another mob inside range
  of the same attack
* backported commit 1b8bffe6a683a2deaadbe858c33a5a9bf0d25be3
2024-04-18 17:17:03 -04:00

View File

@ -2741,7 +2741,7 @@ function mob_class:do_states(dtime)
p = {x = p1.x, y = p1.y, z = p1.z} p = {x = p1.x, y = p1.y, z = p1.z}
end end
self:yaw_to_pos(p) if p then self:yaw_to_pos(p) end
-- move towards enemy if beyond mob reach -- move towards enemy if beyond mob reach
if dist > (self.reach + (self.reach_ext or 0)) then if dist > (self.reach + (self.reach_ext or 0)) then
@ -2785,7 +2785,7 @@ function mob_class:do_states(dtime)
self:set_velocity(0) self:set_velocity(0)
if self.timer > 1 then if self.timer > 1 and p then
-- no custom attack or custom attack returns true to continue -- no custom attack or custom attack returns true to continue
if not self.custom_attack if not self.custom_attack