From b110ea6054f11d3f88ca454bb82f74a1420c84ca Mon Sep 17 00:00:00 2001 From: BigBrotherNii Date: Wed, 24 Jul 2024 14:39:32 +0200 Subject: stop music when entering lobby --- client/audio/sound.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'client/audio') diff --git a/client/audio/sound.gd b/client/audio/sound.gd index 99bf692f..13fde6a2 100644 --- a/client/audio/sound.gd +++ b/client/audio/sound.gd @@ -25,11 +25,12 @@ extends Node var item_sounds: Dictionary = {} var item_id: int = 0 -func play_music(music : String): +func play_music(music : String): # If music == "stop", this stops all music for stream in music_node.get_children(): stream.stop() - music_node.get_node(music).play() + if music != "stop": + music_node.get_node(music).play() func set_volume(value:float): AudioServer.set_bus_volume_db(0, value) -- cgit v1.2.3-70-g09d2