diff options
| author | Hein-Pieter van Braam | 2018-05-13 21:37:08 +0200 |
|---|---|---|
| committer | GitHub | 2018-05-13 21:37:08 +0200 |
| commit | 3cfb9df3258e286acebc41f2ff10ef6cd3558dff (patch) | |
| tree | 10d681d1b6ce6f5adc230beaa8b75da796613fe2 /scene/2d/audio_stream_player_2d.cpp | |
| parent | 24dbe5e3102a0d4830904901de8f6a9ee25d68d5 (diff) | |
| download | godot-3cfb9df3258e286acebc41f2ff10ef6cd3558dff.tar.gz godot-3cfb9df3258e286acebc41f2ff10ef6cd3558dff.tar.zst godot-3cfb9df3258e286acebc41f2ff10ef6cd3558dff.zip | |
Diffstat (limited to 'scene/2d/audio_stream_player_2d.cpp')
| -rw-r--r-- | scene/2d/audio_stream_player_2d.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index 94db832e9..f998f23d3 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -233,6 +233,7 @@ void AudioStreamPlayer2D::_notification(int p_what) { //stop playing if no longer active if (!active) { set_physics_process_internal(false); + //do not update, this makes it easier to animate (will shut off otherwise) //_change_notify("playing"); //update property in editor emit_signal("finished"); } @@ -312,11 +313,6 @@ void AudioStreamPlayer2D::stop() { bool AudioStreamPlayer2D::is_playing() const { -#ifdef TOOLS_ENABLED - if (Engine::get_singleton()->is_editor_hint()) - return fake_active; -#endif - if (stream_playback.is_valid()) { return active; // && stream_playback->is_playing(); } @@ -361,16 +357,11 @@ bool AudioStreamPlayer2D::is_autoplay_enabled() { void AudioStreamPlayer2D::_set_playing(bool p_enable) { -#ifdef TOOLS_ENABLED - fake_active = p_enable; -#endif - if (p_enable) play(); else stop(); } - bool AudioStreamPlayer2D::_is_active() const { return active; |
