diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-22 21:29:56 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-22 21:29:56 +0100 |
commit | 95a4906bb4dcffdb29598852feeddcdf69246811 (patch) | |
tree | de809f97b4f1be4caaf295c2dd46099c4a52f3ac /scene/2d/audio_stream_player_2d.cpp | |
parent | 65a45eb7e3df0d23bb761d622d21d8a6465e29d0 (diff) | |
parent | b6db09968dbae879a7d0c172eb22cbd2f307d012 (diff) |
Merge pull request #65378 from Mickeon/fix-audio-stream-2d-non-immediate-playing
Fix AudioStreamPlayer2D and 3D's `playing` not updating right away
Diffstat (limited to 'scene/2d/audio_stream_player_2d.cpp')
-rw-r--r-- | scene/2d/audio_stream_player_2d.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index 9ac3083718..2ded209180 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -284,6 +284,9 @@ bool AudioStreamPlayer2D::is_playing() const { return true; } } + if (setplay.get() >= 0) { + return true; // play() has been called this frame, but no playback exists just yet. + } return false; } |