summaryrefslogtreecommitdiff
path: root/scene/3d/audio_stream_player_3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/audio_stream_player_3d.cpp')
-rw-r--r--scene/3d/audio_stream_player_3d.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp
index 1ae6f552f4..6efdf25f0d 100644
--- a/scene/3d/audio_stream_player_3d.cpp
+++ b/scene/3d/audio_stream_player_3d.cpp
@@ -266,7 +266,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (!sr[i].collider)
continue;
- Area *tarea = sr[i].collider->cast_to<Area>();
+ Area *tarea = Object::cast_to<Area>(sr[i].collider);
if (!tarea)
continue;
@@ -533,6 +533,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {
if (!active) {
set_fixed_process_internal(false);
_change_notify("playing"); //update property in editor
+ emit_signal("finished");
}
}
}
@@ -898,6 +899,8 @@ void AudioStreamPlayer3D::_bind_methods() {
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_DISABLED);
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_IDLE_STEP);
BIND_ENUM_CONSTANT(DOPPLER_TRACKING_FIXED_STEP);
+
+ ADD_SIGNAL(MethodInfo("finished"));
}
AudioStreamPlayer3D::AudioStreamPlayer3D() {