summaryrefslogtreecommitdiff
path: root/scene/3d/audio_stream_player_3d.cpp
diff options
context:
space:
mode:
authorHein-Pieter van Braam <hp@tmm.cx>2018-05-13 21:37:25 +0200
committerGitHub <noreply@github.com>2018-05-13 21:37:25 +0200
commit55d71e68aa327311f2b9be27677c13f744ce811d (patch)
tree10d681d1b6ce6f5adc230beaa8b75da796613fe2 /scene/3d/audio_stream_player_3d.cpp
parent24dbe5e3102a0d4830904901de8f6a9ee25d68d5 (diff)
parent3cfb9df3258e286acebc41f2ff10ef6cd3558dff (diff)
Merge pull request #18846 from godotengine/revert-17367-audio_playing_
Revert "Use fake audio playing property in editor"
Diffstat (limited to 'scene/3d/audio_stream_player_3d.cpp')
-rw-r--r--scene/3d/audio_stream_player_3d.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index fa2b798769..c2a50ec7bb 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -543,6 +543,7 @@ void AudioStreamPlayer3D::_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");
}
@@ -640,11 +641,6 @@ void AudioStreamPlayer3D::stop() {
bool AudioStreamPlayer3D::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();
}
@@ -689,16 +685,11 @@ bool AudioStreamPlayer3D::is_autoplay_enabled() {
void AudioStreamPlayer3D::_set_playing(bool p_enable) {
-#ifdef TOOLS_ENABLED
- fake_active = p_enable;
-#endif
-
if (p_enable)
play();
else
stop();
}
-
bool AudioStreamPlayer3D::_is_active() const {
return active;