mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 10:52:25 +01:00
Raids/raidcaptain: Nil check cmi_cause
apparently is nil sometimes
This commit is contained in:
parent
3b368fdd5a
commit
ac7038e7a5
@ -102,7 +102,7 @@ function mcl_raids.promote_to_raidcaptain(c) -- object
|
|||||||
l._banner:remove()
|
l._banner:remove()
|
||||||
l._banner = nil
|
l._banner = nil
|
||||||
mcl_raids.drop_obanner(pos)
|
mcl_raids.drop_obanner(pos)
|
||||||
if cmi_cause.type == "punch" and cmi_cause.puncher:is_player() then
|
if cmi_cause and cmi_cause.type == "punch" and cmi_cause.puncher:is_player() then
|
||||||
awards.unlock(cmi_cause.puncher:get_player_name(), "mcl:voluntary_exile")
|
awards.unlock(cmi_cause.puncher:get_player_name(), "mcl:voluntary_exile")
|
||||||
local lv = mcl_potions.player_get_effect(cmi_cause.puncher, "bad_omen")
|
local lv = mcl_potions.player_get_effect(cmi_cause.puncher, "bad_omen")
|
||||||
if not lv then lv = 0
|
if not lv then lv = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user