Address review concerns

This commit is contained in:
teknomunk 2024-12-15 13:53:46 -06:00
parent 2732976404
commit 7de503770f
2 changed files with 4 additions and 2 deletions

View File

@ -419,7 +419,7 @@ function mob_class:check_for_death(cause, cmi_cause)
if on_die_exit == true then
self.state = "die"
mcl_burning.extinguish(self.object)
mcl_util.remove(self)
mcl_util.remove_entity(self)
return true
end
end

View File

@ -88,10 +88,12 @@ mcl_mobs.register_mob("mobs_mc:ghast", {
fireball = le and le.name == "mobs_mc:fireball",
owner = le and le._owner,
}
return true -- Force punch to continue with default behavior
end,
on_die = function(self)
local last_hit = self._last_hit or {}
if last_hit.fireball and last_hit.owner then
if last_hit.fireball and last_hit.owner and core.get_player_by_name(last_hit.owner) then
awards.unlock(last_hit.owner, "mcl:fireball_redir_serv")
end
end,