Add snowball and egg impact sounds
This commit is contained in:
parent
9e31c2b62b
commit
1c7e350095
26
mods/ITEMS/mcl_throwing/README.md
Normal file
26
mods/ITEMS/mcl_throwing/README.md
Normal file
@ -0,0 +1,26 @@
|
||||
# `mcl_throwing`
|
||||
|
||||
It's a MineClone 2 mod containing throwable items like snowballs.
|
||||
|
||||
## License of code
|
||||
|
||||
- MIT License
|
||||
|
||||
## License of media
|
||||
|
||||
- `mcl_throwing_snowball_impact_soft.ogg`:
|
||||
- License: CC BY 3.0 <http://creativecommons.org/licenses/by/3.0/>
|
||||
- Author: YleArkisto (freesound.org)
|
||||
- Source: <https://freesound.org/people/YleArkisto/sounds/258144/>
|
||||
- Original title: `sfx_snowball_hit-03.wav` (file was edited)
|
||||
- `mcl_throwing_snowball_impact_hard.ogg`:
|
||||
- License: CC0
|
||||
- Author: Julien Matthey (freesound.org)
|
||||
- Source: <https://freesound.org/people/Julien%20Matthey/sounds/167080/>
|
||||
- Original title: `JM_IMPACT_01c - Snow on cement.wav` (file was edited)
|
||||
- `mcl_throwing_egg_impact.ogg`:
|
||||
- License: CC0
|
||||
- Author: dav0r (freesound.org)
|
||||
- Source: <https://freesound.org/people/dav0r/sounds/176760/>
|
||||
- Original title: `d0_step_on_egg_04` (file was edited)
|
||||
- Everything else: See MineClone 2 license infos
|
@ -187,6 +187,7 @@ local snowball_on_step = function(self, dtime)
|
||||
-- Destroy when hitting a solid node
|
||||
if self._lastpos.x~=nil then
|
||||
if (def and def.walkable) or not def then
|
||||
minetest.sound_play("mcl_throwing_snowball_impact_hard", { pos = self.object:get_pos(), max_hear_distance=16, gain=0.7 })
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
@ -201,6 +202,7 @@ local snowball_on_step = function(self, dtime)
|
||||
end
|
||||
|
||||
if check_object_hit(self, pos, mob_damage) then
|
||||
minetest.sound_play("mcl_throwing_snowball_impact_soft", { pos = self.object:get_pos(), max_hear_distance=16, gain=0.7 })
|
||||
return
|
||||
end
|
||||
|
||||
@ -254,6 +256,7 @@ local egg_on_step = function(self, dtime)
|
||||
end
|
||||
end
|
||||
end
|
||||
minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 })
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
@ -261,6 +264,7 @@ local egg_on_step = function(self, dtime)
|
||||
|
||||
-- Destroy when hitting a mob or player (no chick spawning)
|
||||
if check_object_hit(self, pos) then
|
||||
minetest.sound_play("mcl_throwing_egg_impact", { pos = self.object:get_pos(), max_hear_distance=10, gain=0.5 })
|
||||
return
|
||||
end
|
||||
|
||||
|
BIN
mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg
Normal file
BIN
mods/ITEMS/mcl_throwing/sounds/mcl_throwing_egg_impact.ogg
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user