diff options
author | Marcelo Fernandez <marcelofg55@gmail.com> | 2018-11-17 11:47:11 -0300 |
---|---|---|
committer | Marcelo Fernandez <marcelofg55@gmail.com> | 2018-11-17 11:47:11 -0300 |
commit | 016f7bd8f8e9bebceab6ef1cfc9c1fdc9c786871 (patch) | |
tree | f503f2be3ab4182622795fb27633c5da8b08339e | |
parent | 0afdc5c559520204987544d30560745dbf29a390 (diff) |
Fix AudioStreamPlayer2D/3D::is_playing right after a play()
-rw-r--r-- | scene/2d/audio_stream_player_2d.cpp | 1 | ||||
-rw-r--r-- | scene/3d/audio_stream_player_3d.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index a092ef826f..c2af725919 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 401a1971c6..afd87deca6 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); |