From cea641b1542bba3c0b03deb7cb1b0e1df590e70a Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Mon, 5 Feb 2024 18:41:07 -0600 Subject: [PATCH] don't early out, *do* use case sensitive filename finding for the stringtable, and finally, don't even bother setting the mSoundpath here unless it's to clear it --- Engine/source/T3D/assets/SoundAsset.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Engine/source/T3D/assets/SoundAsset.cpp b/Engine/source/T3D/assets/SoundAsset.cpp index bd5ca8dda..e01ad315c 100644 --- a/Engine/source/T3D/assets/SoundAsset.cpp +++ b/Engine/source/T3D/assets/SoundAsset.cpp @@ -447,15 +447,10 @@ bool SoundAsset::_setSoundFile(void* object, const char* index, const char* data if (index) id = dAtoui(index); - if (pData->mSoundFile[id] == data) - return false; - // Update. - pData->mSoundFile[id] = data; + pData->mSoundFile[id] = StringTable->insert(data, true); if (pData->mSoundFile[id] == StringTable->EmptyString()) pData->mSoundPath[id] = StringTable->EmptyString(); - else - pData->mSoundPath[id] = pData->getOwned() ? pData->expandAssetFilePath(pData->mSoundFile[id]) : pData->mSoundFile[id]; // Refresh the asset. pData->refreshAsset();