Doors: Avoid crash on nil player in 'can dig door'
d5907d5
why not use if not digger then return false end instead of removing the minetest.record_protection_violation(pos, digger:get_player_name()) ?
if not digger then return false end
minetest.record_protection_violation(pos, digger:get_player_name())
record_protection_violation is used by some mods and can't be handled now.
@ShadowNinja ?
Correct me if i'm wrong, but since you removed minetest.record_protection_violation, we can't use minetest.register_on_protection_violation to catch protection event of locked doors.
minetest.record_protection_violation
minetest.register_on_protection_violation
This comment has been minimized.
alexerate repliedFeb 8, 2018
why not use
if not digger then return false end
instead of removing theminetest.record_protection_violation(pos, digger:get_player_name())
?record_protection_violation is used by some mods and can't be handled now.
This comment has been minimized.
paramat repliedFeb 8, 2018
@ShadowNinja ?
This comment has been minimized.
alexerate repliedFeb 9, 2018
•
edited
Correct me if i'm wrong, but since you removed
minetest.record_protection_violation
, we can't useminetest.register_on_protection_violation
to catch protection event of locked doors.