From 211be7fa9486743903f9f6ea7d6c017e18357756 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Fri, 11 Oct 2024 14:07:37 -0500 Subject: [PATCH] Remove code with no effect other than emitting a warning --- mods/ITEMS/mcl_bows/crossbow.lua | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/mods/ITEMS/mcl_bows/crossbow.lua b/mods/ITEMS/mcl_bows/crossbow.lua index fc7d61898..452c8a570 100644 --- a/mods/ITEMS/mcl_bows/crossbow.lua +++ b/mods/ITEMS/mcl_bows/crossbow.lua @@ -300,21 +300,6 @@ controls.register_on_press(function(player, key, time) if wielditem:get_name()=="mcl_bows:crossbow_loaded" or wielditem:get_name()=="mcl_bows:crossbow_loaded_enchanted" then local enchanted = mcl_enchanting.is_enchanted(wielditem:get_name()) local speed, damage - local p_load = bow_load[player:get_player_name()] - local charge - -- Type sanity check - if type(p_load) == "number" then - charge = minetest.get_us_time() - p_load - else - -- In case something goes wrong ... - -- Just assume minimum charge. - charge = 0 - minetest.log("warning", "[mcl_bows] Player "..player:get_player_name().." fires arrow with non-numeric bow_load!") - end - charge = math.max(math.min(charge, BOW_CHARGE_TIME_FULL), 0) - - local charge_ratio = charge / BOW_CHARGE_TIME_FULL - charge_ratio = math.max(math.min(charge_ratio, 1), 0) -- Calculate damage and speed -- Fully charged