mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Fix attached sounds stopping if objects are removed serverside (#14436)
Restores backwards compatibility for death sounds or other sounds that are not supposed to be "cut off" abruptly. --------- Co-authored-by: sfan5 <sfan5@live.de> Co-authored-by: grorp <gregor.parzefall@posteo.de>
This commit is contained in:
parent
fc80f65a6d
commit
bf52d1e624
8 changed files with 63 additions and 37 deletions
|
@ -1095,6 +1095,7 @@ Table used to specify how a sound is played:
|
|||
-- its end in `-start_time` seconds.
|
||||
-- It is unspecified what happens if `loop` is false and `start_time` is
|
||||
-- smaller than minus the sound's length.
|
||||
|
||||
-- Available since feature `sound_params_start_time`.
|
||||
|
||||
loop = false,
|
||||
|
@ -1108,6 +1109,21 @@ Table used to specify how a sound is played:
|
|||
-- Attach the sound to an object.
|
||||
-- Can't be used together with `pos`.
|
||||
|
||||
-- For backward compatibility, sounds continue playing at the last location
|
||||
-- of the object if an object is removed (for example if an entity dies).
|
||||
-- It is not recommended to rely on this.
|
||||
-- For death sounds, prefer playing a positional sound instead.
|
||||
|
||||
-- If you want to stop a sound when an entity dies or is deactivated,
|
||||
-- store the handle and call `minetest.sound_stop` in `on_die` / `on_deactivate`.
|
||||
|
||||
-- Ephemeral sounds are entirely unaffected by the object being removed
|
||||
-- or leaving the active object range.
|
||||
|
||||
-- Non-ephemeral sounds stop playing on clients if objects leave
|
||||
-- the active object range; they should start playing again if objects
|
||||
--- come back into range (but due to a known bug, they don't yet).
|
||||
|
||||
to_player = name,
|
||||
-- Only play for this player.
|
||||
-- Can't be used together with `exclude_player`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue