|
@@ -2347,14 +2347,12 @@ void ShapeBase::updateAudioState(SoundThread& st)
|
|
|
if ( isGhost() )
|
|
|
{
|
|
|
// if asset is valid, play
|
|
|
- if (st.asset->isAssetValid() )
|
|
|
+ if (st.asset->load() == AssetBase::Ok)
|
|
|
{
|
|
|
- if (st.asset->load() == AssetBase::Ok)
|
|
|
- {
|
|
|
- st.sound = SFX->createSource(st.asset->getSFXTrack(), &getTransform());
|
|
|
- if (st.sound)
|
|
|
- st.sound->play();
|
|
|
- }
|
|
|
+ SFXTrack* trk = st.asset->getSFXTrack();
|
|
|
+ st.sound = SFX->createSource(trk, &getTransform());
|
|
|
+ if (st.sound)
|
|
|
+ st.sound->play();
|
|
|
}
|
|
|
else
|
|
|
st.play = false;
|