Fix crash in mcl_mobs

This commit is contained in:
Wuzzy 2020-07-16 20:26:41 +02:00
parent b9ba1300f9
commit 90cc3b9659
1 changed files with 3 additions and 3 deletions

View File

@ -1071,7 +1071,7 @@ local do_jump = function(self)
end end
-- blast damage to entities nearby (modified from TNT mod) -- blast damage to entities nearby
local entity_physics = function(pos, radius) local entity_physics = function(pos, radius)
radius = radius * 2 radius = radius * 2
@ -3865,7 +3865,7 @@ function mobs:safe_boom(self, pos, strength)
gain = 1.0, gain = 1.0,
max_hear_distance = self.sounds and self.sounds.distance or 32 max_hear_distance = self.sounds and self.sounds.distance or 32
}, true) }, true)
local radius = strength
entity_physics(pos, radius) entity_physics(pos, radius)
effect(pos, 32, "tnt_smoke.png", radius * 3, radius * 5, radius, 1, 0) effect(pos, 32, "tnt_smoke.png", radius * 3, radius * 5, radius, 1, 0)
end end
@ -3881,7 +3881,7 @@ function mobs:boom(self, pos, strength, fire)
mobs:safe_boom(self, pos, strength) mobs:safe_boom(self, pos, strength)
end end
else else
mobs:safe_boom(self, pos, radius) mobs:safe_boom(self, pos, strength)
end end
end end