mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-10 22:24:33 +00:00
Working thunder. These changes may need to be applied to other sound arrays or image arrays.
This commit is contained in:
parent
ad0c141189
commit
8a1d3f2021
2 changed files with 11 additions and 5 deletions
|
|
@ -279,18 +279,18 @@ StringTableEntry SoundAsset::getAssetIdByFileName(StringTableEntry fileName)
|
|||
return materialAssetId;
|
||||
}
|
||||
|
||||
U32 SoundAsset::getAssetById(StringTableEntry assetId, AssetPtr<SoundAsset>* materialAsset)
|
||||
U32 SoundAsset::getAssetById(StringTableEntry assetId, AssetPtr<SoundAsset>* soundAsset)
|
||||
{
|
||||
(*materialAsset) = assetId;
|
||||
(*soundAsset) = assetId;
|
||||
|
||||
if (materialAsset->notNull())
|
||||
if (soundAsset->notNull())
|
||||
{
|
||||
return (*materialAsset)->mLoadedState;
|
||||
return (*soundAsset)->mLoadedState;
|
||||
}
|
||||
else
|
||||
{
|
||||
//Well that's bad, loading the fallback failed.
|
||||
Con::warnf("MaterialAsset::getAssetById - Finding of asset with id %s failed with no fallback asset", assetId);
|
||||
Con::warnf("SoundAsset::getAssetById - Finding of asset with id %s failed with no fallback asset", assetId);
|
||||
return AssetErrCode::Failed;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue