From 5bd3ebda17812da86b2eb8b31b39943e73d734f0 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 7 Dec 2020 00:02:32 +0100 Subject: [PATCH] Add throwing sound --- mods/ITEMS/mcl_potions/lingering.lua | 5 ++++- mods/ITEMS/mcl_potions/splash.lua | 5 ++++- mods/ITEMS/mcl_throwing/README.md | 6 ++++++ mods/ITEMS/mcl_throwing/init.lua | 1 + .../mcl_throwing/sounds/mcl_throwing_throw.ogg | Bin 0 -> 10877 bytes 5 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 mods/ITEMS/mcl_throwing/sounds/mcl_throwing_throw.ogg diff --git a/mods/ITEMS/mcl_potions/lingering.lua b/mods/ITEMS/mcl_potions/lingering.lua index f04b655f44..cea045233c 100644 --- a/mods/ITEMS/mcl_potions/lingering.lua +++ b/mods/ITEMS/mcl_potions/lingering.lua @@ -108,6 +108,7 @@ function mcl_potions.register_lingering(name, descr, color, def) local velocity = 10 local dir = placer:get_look_dir(); local pos = placer:getpos(); + minetest.sound_play("mcl_throwing_throw", {pos = pos, gain = 0.4, max_hear_distance = 16}, true) local obj = minetest.add_entity({x=pos.x+dir.x,y=pos.y+2+dir.y,z=pos.z+dir.z}, id.."_flying") obj:setvelocity({x=dir.x*velocity,y=dir.y*velocity,z=dir.z*velocity}) obj:setacceleration({x=dir.x*-3, y=-9.8, z=dir.z*-3}) @@ -120,7 +121,9 @@ function mcl_potions.register_lingering(name, descr, color, def) stack_max = 1, _on_dispense = function(stack, dispenserpos, droppos, dropnode, dropdir) local s_pos = vector.add(dispenserpos, vector.multiply(dropdir, 0.51)) - local obj = minetest.add_entity({x=s_pos.x+dropdir.x,y=s_pos.y+dropdir.y,z=s_pos.z+dropdir.z}, id.."_flying") + local pos = {x=s_pos.x+dropdir.x,y=s_pos.y+dropdir.y,z=s_pos.z+dropdir.z} + minetest.sound_play("mcl_throwing_throw", {pos = pos, gain = 0.4, max_hear_distance = 16}, true) + local obj = minetest.add_entity(pos, id.."_flying") local velocity = 22 obj:set_velocity({x=dropdir.x*velocity,y=dropdir.y*velocity,z=dropdir.z*velocity}) obj:set_acceleration({x=dropdir.x*-3, y=-9.8, z=dropdir.z*-3}) diff --git a/mods/ITEMS/mcl_potions/splash.lua b/mods/ITEMS/mcl_potions/splash.lua index 14c7f455e4..d5cf307821 100644 --- a/mods/ITEMS/mcl_potions/splash.lua +++ b/mods/ITEMS/mcl_potions/splash.lua @@ -30,6 +30,7 @@ function mcl_potions.register_splash(name, descr, color, def) local velocity = 10 local dir = placer:get_look_dir(); local pos = placer:get_pos(); + minetest.sound_play("mcl_throwing_throw", {pos = pos, gain = 0.4, max_hear_distance = 16}, true) local obj = minetest.add_entity({x=pos.x+dir.x,y=pos.y+2+dir.y,z=pos.z+dir.z}, id.."_flying") obj:set_velocity({x=dir.x*velocity,y=dir.y*velocity,z=dir.z*velocity}) obj:set_acceleration({x=dir.x*-3, y=-9.8, z=dir.z*-3}) @@ -42,7 +43,9 @@ function mcl_potions.register_splash(name, descr, color, def) stack_max = 1, _on_dispense = function(stack, dispenserpos, droppos, dropnode, dropdir) local s_pos = vector.add(dispenserpos, vector.multiply(dropdir, 0.51)) - local obj = minetest.add_entity({x=s_pos.x+dropdir.x,y=s_pos.y+dropdir.y,z=s_pos.z+dropdir.z}, id.."_flying") + local pos = {x=s_pos.x+dropdir.x,y=s_pos.y+dropdir.y,z=s_pos.z+dropdir.z} + minetest.sound_play("mcl_throwing_throw", {pos = pos, gain = 0.4, max_hear_distance = 16}, true) + local obj = minetest.add_entity(pos, id.."_flying") local velocity = 22 obj:set_velocity({x=dropdir.x*velocity,y=dropdir.y*velocity,z=dropdir.z*velocity}) obj:set_acceleration({x=dropdir.x*-3, y=-9.8, z=dropdir.z*-3}) diff --git a/mods/ITEMS/mcl_throwing/README.md b/mods/ITEMS/mcl_throwing/README.md index c91a537e88..a1ad06a8e8 100644 --- a/mods/ITEMS/mcl_throwing/README.md +++ b/mods/ITEMS/mcl_throwing/README.md @@ -23,4 +23,10 @@ It's a MineClone 2 mod containing throwable items like snowballs. - Author: dav0r (freesound.org) - Source: - Original title: `d0_step_on_egg_04` (file was edited) +- `mcl_throwing_throw.ogg`: + - License: CC0 + - Author: kretopi (freesound.org) + - Source: + - Original title: `Arrow002.wav` (file was edited) + - Everything else: See MineClone 2 license infos diff --git a/mods/ITEMS/mcl_throwing/init.lua b/mods/ITEMS/mcl_throwing/init.lua index e46055e8a0..5fe34b45e3 100644 --- a/mods/ITEMS/mcl_throwing/init.lua +++ b/mods/ITEMS/mcl_throwing/init.lua @@ -31,6 +31,7 @@ mcl_throwing.throw = function(throw_item, pos, dir, velocity, thrower) if velocity == nil then velocity = 22 end + minetest.sound_play("mcl_throwing_throw", {pos=pos, gain=0.4, max_hear_distance=16}, true) local itemstring = ItemStack(throw_item):get_name() local obj = minetest.add_entity(pos, entity_mapping[itemstring]) diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_throw.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_throw.ogg new file mode 100644 index 0000000000000000000000000000000000000000..acd9c045064a7218080473354e473bde8d27369a GIT binary patch literal 10877 zcmb_?cUV(P*YCzgIfyiorhtMFssSQ|UIZjG4LyK`BE3lHRi!H+(tA-tFH#afq$s`j zE+9oZgd!j!aChLG_dEBy_xbKWcR#~qX4aauW|iN}WD^Z@b4}nJ@b{Bz*e*mCvfoDtJfm&K;3E!mM0KGgD_1OFMH`1v?i@M|(S4Gdm{;K?~8v zGZ{Q`@;XES2{-~(Wo>%V8=(yVlmPIA9YPWHOc{cS&fs#7kG@Z6HQfn`j}B>~HwlF{ z|5LFFn_dNg3&0C5((n%p%2wTQb9&Bj$8@-*x@a~l@#}}*;iO-8Z=2XXA7W35-Q_hwm^EY3SxF_Wy?->B;(FWe?=zP%Ic>oxSScKF1DQWAzW;Q ztGrk4FTV1Ager7M$E2v{l93m>8@`zQcSU+?2P?Q1xl0VDlyW2l@xhR+ct=pwnOUsB z3(!nJ=^d?d32jFSb5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