diff --git a/mods/ITEMS/mcl_throwing/README.txt b/mods/ITEMS/mcl_throwing/README.txt index 28bacdff8..fcafdbdf5 100644 --- a/mods/ITEMS/mcl_throwing/README.txt +++ b/mods/ITEMS/mcl_throwing/README.txt @@ -1,10 +1,13 @@ This mod adds bows, arrows and throwable items for MineClone 2. License: -Source code: LGPL 3.0 -Textures: See MineClone 2 license notes. -Everything else: MIT License - -Incorporates code from the [bow] mod by Arcelmi. -https://github.com/Arcelmi/minetest-bows +* Source code: LGPL 3.0 + * Incorporates code from the [bow] mod by Arcelmi. + https://github.com/Arcelmi/minetest-bows +* Textures: See MineClone 2 license notes. +* Sounds: + * mcl_throwing_bow_shoot.ogg: MIT License + * mcl_throwing_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/ diff --git a/mods/ITEMS/mcl_throwing/arrow.lua b/mods/ITEMS/mcl_throwing/arrow.lua index e6478fae1..ef7e8f465 100644 --- a/mods/ITEMS/mcl_throwing/arrow.lua +++ b/mods/ITEMS/mcl_throwing/arrow.lua @@ -100,8 +100,15 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime) full_punch_interval=1.0, damage_groups={fleshy=self._damage}, }, nil) - if mod_mcl_hunger and is_player then - mcl_hunger.exhaust(obj:get_player_name(), mcl_hunger.EXHAUST_DAMAGE) + + if is_player then + if self._shooter and self._shooter:is_player() then + -- “Ding” sound for hitting another player + minetest.sound_play({name="mcl_throwing_hit_player", gain=0.1}, {to_player=self._shooter}) + end + if mod_mcl_hunger then + mcl_hunger.exhaust(obj:get_player_name(), mcl_hunger.EXHAUST_DAMAGE) + end end if lua then diff --git a/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_hit_player.ogg b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_hit_player.ogg new file mode 100644 index 000000000..abf6163a3 Binary files /dev/null and b/mods/ITEMS/mcl_throwing/sounds/mcl_throwing_hit_player.ogg differ