Resolve review comments
This commit is contained in:
parent
20faf62b4b
commit
fc2025191b
|
@ -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)
|
local function spawn_item(self, pos)
|
||||||
if not minetest.is_creative_enabled("") then
|
if not minetest.is_creative_enabled("") then
|
||||||
local item = minetest.add_item(pos, "mcl_bows:arrow")
|
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())
|
item:set_yaw(self.object:get_yaw())
|
||||||
end
|
end
|
||||||
mcl_burning.extinguish(self.object)
|
mcl_burning.extinguish(self.object)
|
||||||
|
@ -206,8 +206,8 @@ local arrow_entity = {
|
||||||
self._stucktimer = 0
|
self._stucktimer = 0
|
||||||
self._stuckrechecktimer = 0
|
self._stuckrechecktimer = 0
|
||||||
|
|
||||||
self.object:set_velocity(vector.new(0, 0, 0))
|
self.object:set_velocity(vector.zero())
|
||||||
self.object:set_acceleration(vector.new(0, 0, 0))
|
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)
|
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
|
if vel and not self._stuck then
|
||||||
local yaw = minetest.dir_to_yaw(vel)+YAW_OFFSET
|
local yaw = minetest.dir_to_yaw(vel)+YAW_OFFSET
|
||||||
local pitch = dir_to_pitch(vel)
|
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
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|
|
@ -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)
|
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
|
if power == nil then
|
||||||
power = BOW_MAX_SPEED --19
|
power = BOW_MAX_SPEED --19
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue