0
0
Fork 0

New bow+arrow sounds

This commit is contained in:
Wuzzy 2020-12-08 16:07:49 +01:00
parent 6532148f2f
commit 63e8b8cb63
5 changed files with 8 additions and 2 deletions

View File

@ -7,7 +7,10 @@ License:
* Textures: See MineClone 2 license notes.
* Sounds:
* mcl_bows_bow_shoot.ogg: MIT License
* mcl_bows_bow_shoot.ogg: CC0 by Freesound.org user JoeDinesSound
https://freesound.org/people/JoeDinesSound/sounds/534942/
* mcl_bows_hit_other.ogg: CC0 by Freesound.org user JoeDinesSound
https://freesound.org/people/JoeDinesSound/sounds/534952/
* mcl_bows_hit_player.ogg: CC BY 3.0 by Freesound.org user tim.kahn.
https://freesound.org/people/tim.kahn/sounds/38495/
http://creativecommons.org/licenses/by/3.0/

View File

@ -274,6 +274,7 @@ ARROW_ENTITY.on_step = function(self, dtime)
end
end
end
minetest.sound_play({name="mcl_bows_hit_other", gain=0.3}, {pos=self.object:get_pos(), max_hear_distance=16}, true)
end
self.object:remove()
return
@ -325,6 +326,8 @@ ARROW_ENTITY.on_step = function(self, dtime)
self.object:set_velocity({x=0, y=0, z=0})
self.object:set_acceleration({x=0, y=0, z=0})
minetest.sound_play({name="mcl_bows_hit_other", gain=0.3}, {pos=self.object:get_pos(), max_hear_distance=16}, true)
-- Push the button! Push, push, push the button!
if mod_button and minetest.get_item_group(node.name, "button") > 0 and minetest.get_item_group(node.name, "button_push_by_arrow") == 1 then
local bdir = minetest.wallmounted_to_dir(node.param2)

View File

@ -49,7 +49,7 @@ mcl_bows.shoot_arrow = function(arrow_item, pos, dir, yaw, shooter, power, damag
le._damage = damage
le._is_critical = is_critical
le._startpos = pos
minetest.sound_play("mcl_bows_bow_shoot", {pos=pos}, true)
minetest.sound_play("mcl_bows_bow_shoot", {pos=pos, max_hear_distance=16}, true)
if shooter ~= nil and shooter:is_player() then
if obj:get_luaentity().player == "" then
obj:get_luaentity().player = shooter

Binary file not shown.