From c67e09b1d48c1ccb768758686f9fee6d913778d0 Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 16 Nov 2024 15:38:19 -0600 Subject: [PATCH] Fix tipped arrow behavior, remove debug code --- mods/ITEMS/mcl_potions/tipped_arrow.lua | 2 +- mods/ITEMS/vl_projectile/init.lua | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/mods/ITEMS/mcl_potions/tipped_arrow.lua b/mods/ITEMS/mcl_potions/tipped_arrow.lua index 1e610f15a..0e17328ff 100644 --- a/mods/ITEMS/mcl_potions/tipped_arrow.lua +++ b/mods/ITEMS/mcl_potions/tipped_arrow.lua @@ -81,7 +81,7 @@ function mcl_potions.register_arrow(name, desc, color, def) mcl_bows.arrow_entity.on_activate(self, staticdata, dtime_s) self._arrow_item = arrow_item end - minetest.register_entity("mcl_potions:"..name.."_arrow_entity", arrow_entity) + vl_projectile.register("mcl_potions:"..name.."_arrow_entity", arrow_entity) if minetest.get_modpath("mcl_bows") then minetest.register_craft({ diff --git a/mods/ITEMS/vl_projectile/init.lua b/mods/ITEMS/vl_projectile/init.lua index 4ff5faba9..efb3d79aa 100644 --- a/mods/ITEMS/vl_projectile/init.lua +++ b/mods/ITEMS/vl_projectile/init.lua @@ -308,7 +308,6 @@ local function stuck_on_step(self, dtime, entity_def, projectile_def) if not minetest.is_creative_enabled(player_name) then local arrow_item = self._itemstring or self._arrow_item if arrow_item and minetest.registered_items[arrow_item] and obj:get_inventory():room_for_item("main", arrow_item) then - minetest.log("inventory add: "..dump(arrow_item)) obj:get_inventory():add_item("main", arrow_item) self._picked_up = true @@ -459,17 +458,6 @@ local function handle_entity_collision(self, entity_def, projectile_def, object) allow_punching = allow_punching(self, entity_def, projectile_def, object) end - if DEBUG then - minetest.log("handle_entity_collision("..dump({ - self = self, - allow_punching = allow_punching, - entity_def = entity_def, - object = object, - object_id = mcl_util.get_entity_id(object), - luaentity = object:get_luaentity(), - })..")") - end - if not allow_punching then return end local object_lua = object:get_luaentity()