forked from MineClone5/MineClone5
Correct crash when no arrow is in the inventory and the bow is drawn.
This commit is contained in:
parent
623f60ab79
commit
c4271cf13d
|
@ -219,7 +219,7 @@ controls.register_on_release(function(player, key, time)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
controls.register_on_hold(function(player, key, time)
|
controls.register_on_hold(function(player, key, time)
|
||||||
if key ~= "RMB" then
|
if key ~= "RMB" or not get_arrow(player) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
|
|
Loading…
Reference in New Issue