Fix sound direction and add experimental:soundblock alias sb in minimal for testing
This commit is contained in:
parent
41f4941b74
commit
a869d23451
|
@ -20,6 +20,25 @@ function switch_player_visual()
|
||||||
end
|
end
|
||||||
minetest.after(1.0, switch_player_visual)
|
minetest.after(1.0, switch_player_visual)
|
||||||
|
|
||||||
|
minetest.register_node("experimental:soundblock", {
|
||||||
|
tile_images = {"unknown_block.png", "default_tnt_bottom.png",
|
||||||
|
"default_tnt_side.png", "default_tnt_side.png",
|
||||||
|
"default_tnt_side.png", "default_tnt_side.png"},
|
||||||
|
inventory_image = minetest.inventorycube("unknown_block.png",
|
||||||
|
"default_tnt_side.png", "default_tnt_side.png"),
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_alias("sb", "experimental:soundblock")
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"experimental:soundblock"},
|
||||||
|
interval = 1,
|
||||||
|
chance = 1,
|
||||||
|
action = function(p0, node, _, _)
|
||||||
|
minetest.sound_play("default_grass_footstep", {pos=p0, gain=0.5})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
stepsound = -1
|
stepsound = -1
|
||||||
function test_sound()
|
function test_sound()
|
||||||
|
|
|
@ -2080,7 +2080,7 @@ void the_game(
|
||||||
// Update sound listener
|
// Update sound listener
|
||||||
sound->updateListener(camera.getCameraNode()->getPosition(),
|
sound->updateListener(camera.getCameraNode()->getPosition(),
|
||||||
v3f(0,0,0), // velocity
|
v3f(0,0,0), // velocity
|
||||||
camera.getCameraNode()->getTarget(),
|
camera.getDirection(),
|
||||||
camera.getCameraNode()->getUpVector());
|
camera.getCameraNode()->getUpVector());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue