added sound on shoot

This commit is contained in:
Thomas Rudin 2018-11-16 08:43:37 +01:00
parent f633baffe1
commit 71792ba313
3 changed files with 10 additions and 1 deletions

5
readme.md Normal file

@ -0,0 +1,5 @@
# Attributions
* sounds/spacecannon_shoot.ogg https://freesound.org/people/jonccox/sounds/175261/

Binary file not shown.

@ -7,7 +7,6 @@ end
spacecannon.fire = function(pos, color, speed, range)
if has_warzone_mod then
-- check warzone height
local min_y = warzone.y_start
@ -32,6 +31,11 @@ spacecannon.fire = function(pos, color, speed, range)
meta:set_int("powerstorage", 0)
end
minetest.sound_play("spacecannon_shoot", {
pos = pos,
gain = 1.0,
max_hear_distance = 16
})
local node = minetest.get_node(pos)
local dir = spacecannon.facedir_to_down_dir(node.param2)