forked from MineClone5/MineClone5
Merge 5.1.1 into master
This commit is contained in:
commit
55db5d6b4a
|
@ -173,9 +173,10 @@ local function set_shield(player, block, i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local shield = mcl_shields.players[player].shields[i]
|
local shield = mcl_shields.players[player].shields[i]
|
||||||
if shield then
|
if not shield then return end
|
||||||
shield:get_luaentity()._blocking = block
|
local luaentity = shield:get_luaentity()
|
||||||
end
|
if not luaentity then return end
|
||||||
|
luaentity._blocking = block
|
||||||
end
|
end
|
||||||
|
|
||||||
local function set_interact(player, interact)
|
local function set_interact(player, interact)
|
||||||
|
|
|
@ -41,14 +41,19 @@ function mcl_wieldview.update_wielded_item(player)
|
||||||
|
|
||||||
local def = mcl_wieldview.players[player]
|
local def = mcl_wieldview.players[player]
|
||||||
|
|
||||||
if def.item == itemname then
|
if def and (def.item == itemname) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
def.item = itemname
|
local texture = mcl_wieldview.get_item_texture(itemname) or "blank.png"
|
||||||
def.texture = mcl_wieldview.get_item_texture(itemname) or "blank.png"
|
|
||||||
|
|
||||||
mcl_player.player_set_wielditem(player, def.texture)
|
local new_def = {
|
||||||
|
item = itemname,
|
||||||
|
texture = texture,
|
||||||
|
}
|
||||||
|
mcl_wieldview.players[player] = new_def
|
||||||
|
|
||||||
|
mcl_player.player_set_wielditem(player, texture)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
|
Loading…
Reference in New Issue