forked from VoxeLibre/VoxeLibre
Tiny adjustments
- wither initial explosion radius moved from a magic value into a local variable - wither initial explosion radius reduced - wither attack_exception improved to better handle unlikely edge cases
This commit is contained in:
parent
966712f4ff
commit
d7c76e33d8
|
@ -9,6 +9,8 @@ local follow_spawner = minetest.settings:get_bool("wither_follow_spawner") == tr
|
|||
local w_strafes = minetest.settings:get_bool("wither_strafes") ~= false
|
||||
local anti_troll = minetest.settings:get_bool("wither_anti_troll_measures") ~= false
|
||||
|
||||
local WITHER_INIT_BOOM = 7
|
||||
|
||||
local function atan(x)
|
||||
if not x or x ~= x then
|
||||
return 0
|
||||
|
@ -115,8 +117,8 @@ mcl_mobs.register_mob("mobs_mc:wither", {
|
|||
extra_hostile = true,
|
||||
attack_exception = function(p)
|
||||
local ent = p:get_luaentity()
|
||||
if not ent then return false end
|
||||
if not ent.is_mob or ent.harmed_by_heal or string.find(ent.name, "ghast") then return true
|
||||
if p:is_player() then return false end
|
||||
if not ent or not ent.is_mob or ent.harmed_by_heal or string.find(ent.name, "ghast") then return true
|
||||
else return false end
|
||||
end,
|
||||
|
||||
|
@ -145,7 +147,7 @@ mcl_mobs.register_mob("mobs_mc:wither", {
|
|||
|
||||
if self._spawning <= 0 then
|
||||
if mobs_griefing and not minetest.is_protected(pos, "") then
|
||||
mcl_explosions.explode(pos, 10, { drop_chance = 1.0 }, self.object)
|
||||
mcl_explosions.explode(pos, WITHER_INIT_BOOM, { drop_chance = 1.0 }, self.object)
|
||||
else
|
||||
mcl_mobs.mob_class.safe_boom(self, pos, 10)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue