From 3b0690dcc3481b37765cb829107b66c07479c6ce Mon Sep 17 00:00:00 2001 From: teknomunk Date: Sat, 31 Aug 2024 10:26:15 -0500 Subject: [PATCH] Resolve review comments --- mods/ITEMS/mcl_bows/arrow.lua | 8 ++++---- mods/ITEMS/mcl_bows/bow.lua | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index b16cc7b91..ceefdb265 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -58,7 +58,7 @@ S("Arrows might get stuck on solid blocks and can be retrieved again. They are a local function spawn_item(self, pos) if not minetest.is_creative_enabled("") then local item = minetest.add_item(pos, "mcl_bows:arrow") - item:set_velocity(vector.new(0, 0, 0)) + item:set_velocity(vector.zero()) item:set_yaw(self.object:get_yaw()) end mcl_burning.extinguish(self.object) @@ -206,8 +206,8 @@ local arrow_entity = { self._stucktimer = 0 self._stuckrechecktimer = 0 - self.object:set_velocity(vector.new(0, 0, 0)) - self.object:set_acceleration(vector.new(0, 0, 0)) + self.object:set_velocity(vector.zero()) + self.object:set_acceleration(vector.zero()) minetest.sound_play({name="mcl_bows_hit_other", gain=0.3}, {pos=self.object:get_pos(), max_hear_distance=16}, true) @@ -373,7 +373,7 @@ local arrow_entity = { if vel and not self._stuck then local yaw = minetest.dir_to_yaw(vel)+YAW_OFFSET local pitch = dir_to_pitch(vel) - self.object:set_rotation({ x = 0, y = yaw, z = pitch }) + self.object:set_rotation(vector.new(0,yaw,pitch)) end end, diff --git a/mods/ITEMS/mcl_bows/bow.lua b/mods/ITEMS/mcl_bows/bow.lua index 7150c9f17..8c71fbc74 100644 --- a/mods/ITEMS/mcl_bows/bow.lua +++ b/mods/ITEMS/mcl_bows/bow.lua @@ -37,7 +37,7 @@ mcl_fovapi.register_modifier({ }) function mcl_bows.shoot_arrow(arrow_item, pos, dir, yaw, shooter, power, damage, is_critical, bow_stack, collectable) - local obj = minetest.add_entity({x=pos.x,y=pos.y,z=pos.z}, "mcl_bows:arrow_entity") + local obj = minetest.add_entity(pos, "mcl_bows:arrow_entity") if power == nil then power = BOW_MAX_SPEED --19 end