Correct crash when no arrow is in the inventory and the bow is drawn.

This commit is contained in:
Brandon 2020-07-21 18:55:41 -04:00
parent 623f60ab79
commit c4271cf13d

View file

@ -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()