mirror of
https://codeberg.org/tenplus1/ambience.git
synced 2024-12-26 18:50:29 +01:00
only reset if handlers match
This commit is contained in:
parent
0b7b1fd27d
commit
01ebd210df
9
init.lua
9
init.lua
@ -252,12 +252,15 @@ minetest.register_globalstep(function(dtime)
|
||||
-- set timer to stop sound
|
||||
minetest.after(ambience.length, function()
|
||||
|
||||
--print("-- timed stop after", set_name, handler, player_name)
|
||||
--print("-- timed stop", set_name, handler)
|
||||
|
||||
minetest.sound_stop(handler)
|
||||
|
||||
-- make sure player still around and reset variables
|
||||
if playing[player_name] then
|
||||
-- reset variables if handlers match
|
||||
if playing[player_name]
|
||||
and playing[player_name].handler == handler then
|
||||
|
||||
--print("-- timed reset", handler, player_name)
|
||||
|
||||
playing[player_name].set = nil
|
||||
playing[player_name].gain = nil
|
||||
|
Loading…
Reference in New Issue
Block a user