From 016f7bd8f8e9bebceab6ef1cfc9c1fdc9c786871 Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Sat, 17 Nov 2018 11:47:11 -0300 Subject: [PATCH] Fix AudioStreamPlayer2D/3D::is_playing right after a play() --- scene/2d/audio_stream_player_2d.cpp | 1 + scene/3d/audio_stream_player_3d.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index a092ef826f4..c2af725919f 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -323,6 +323,7 @@ void AudioStreamPlayer2D::play(float p_from_pos) { } if (stream_playback.is_valid()) { + active = true; setplay = p_from_pos; output_ready = false; set_physics_process_internal(true); diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index 401a1971c6b..afd87deca65 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -641,6 +641,7 @@ float AudioStreamPlayer3D::get_pitch_scale() const { void AudioStreamPlayer3D::play(float p_from_pos) { if (stream_playback.is_valid()) { + active = true; setplay = p_from_pos; output_ready = false; set_physics_process_internal(true);