mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 05:43:43 +01:00
Fix mcl_shields is_blocking crash when object not found under player
This commit is contained in:
parent
c70ae8e535
commit
f94e7fc52f
@ -112,6 +112,7 @@ end
|
||||
|
||||
function mcl_shields.is_blocking(obj)
|
||||
if not obj:is_player() then return end
|
||||
if mcl_shields.players[obj] then
|
||||
local blocking = mcl_shields.players[obj].blocking
|
||||
if blocking <= 0 then
|
||||
return
|
||||
@ -123,6 +124,7 @@ function mcl_shields.is_blocking(obj)
|
||||
end
|
||||
return blocking, shieldstack
|
||||
end
|
||||
end
|
||||
|
||||
mcl_damage.register_modifier(function(obj, damage, reason)
|
||||
local type = reason.type
|
||||
|
Loading…
Reference in New Issue
Block a user