fill in asset based sound group if not specified by instanced emitter

This commit is contained in:
AzaezelX 2025-01-26 20:52:50 -06:00
parent b105fce2f2
commit 557b3639eb
2 changed files with 5 additions and 0 deletions

View file

@ -840,6 +840,9 @@ void SFXEmitter::_update()
if (mDirty.test(SourceGroup) && mInstanceDescription->mSourceGroup)
mInstanceDescription->mSourceGroup->addObject(mSource);
else if (getSoundDescription() && getSoundDescription()->mSourceGroup)
getSoundDescription()->mSourceGroup->addObject(mSource);
// Skip these 3d only settings.
if(mInstanceDescription->mIs3D )
{

View file

@ -184,6 +184,8 @@ void GuiAudioCtrl::_update()
mSoundPlaying->setFadeTimes(mFadeInTime, mFadeOutTime);
}
else
getSoundDescription()->mSourceGroup->addObject(mSoundPlaying);
mSoundPlaying->play();
}