Merge branch 'UnifyAudioListenerWarnings' of https://github.com/xxSeys1/FlaxEngine into xxSeys1-UnifyAudioListenerWarnings

This commit is contained in:
2026-02-03 17:45:52 +01:00
+3 -4
View File
@@ -37,15 +37,14 @@ void AudioListener::OnEnable()
{
_prevPos = GetPosition();
_velocity = Vector3::Zero;
ASSERT(!Audio::Listeners.Contains(this));
if (Audio::Listeners.Count() >= AUDIO_MAX_LISTENERS)
{
LOG(Error, "Unsupported amount of the audio listeners!");
LOG(Warning, "There is more than one Audio Listener active. Please make sure only exactly one is active at any given time.");
}
else
{
ASSERT(!Audio::Listeners.Contains(this));
if (Audio::Listeners.Count() > 0)
LOG(Warning, "There is more than one Audio Listener active. Please make sure only exactly one is active at any given time.");
Audio::Listeners.Add(this);
AudioBackend::Listener::Reset();
AudioBackend::Listener::TransformChanged(GetPosition(), GetOrientation());