mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 20:03:45 +01:00
Fix shield behavior
This commit is contained in:
parent
6afe7cfb58
commit
148be4ea39
@ -271,6 +271,8 @@ local function handle_blocking(player)
|
|||||||
end
|
end
|
||||||
elseif shield_in_offhand then
|
elseif shield_in_offhand then
|
||||||
local offhand_can_block = (wielded_item(player) == "" or not mcl_util.get_pointed_thing(player, true))
|
local offhand_can_block = (wielded_item(player) == "" or not mcl_util.get_pointed_thing(player, true))
|
||||||
|
and (minetest.get_item_group(wielded_item(player), "bow") ~= 1 and minetest.get_item_group(wielded_item(player), "crossbow") ~= 1)
|
||||||
|
|
||||||
if not offhand_can_block then
|
if not offhand_can_block then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user