Merge pull request #87732 from aaronfranke/fix-audio-player-3d-autoplay-notif

Fix AudioStreamPlayer3D autoplay and internal notifications
This commit is contained in:
Rémi Verschelde 2024-01-30 17:48:15 +01:00
commit 07df0a7ae5
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -240,6 +240,7 @@ float AudioStreamPlayer3D::_get_attenuation_db(float p_distance) const {
} }
void AudioStreamPlayer3D::_notification(int p_what) { void AudioStreamPlayer3D::_notification(int p_what) {
internal->notification(p_what);
switch (p_what) { switch (p_what) {
case NOTIFICATION_ENTER_TREE: { case NOTIFICATION_ENTER_TREE: {
velocity_tracker->reset(get_global_transform().origin); velocity_tracker->reset(get_global_transform().origin);