Browse Source

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

AzaezelX 1 year ago
parent
commit
cea641b154
1 changed files with 1 additions and 6 deletions
  1. 1 6
      Engine/source/T3D/assets/SoundAsset.cpp

+ 1 - 6
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();