File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Core/GameEngine/Source/Common/Audio Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -800,23 +800,22 @@ AsciiString AudioEventRTS::generateFilenameExtension( AudioType audioTypeToPlay
800
800
// -------------------------------------------------------------------------------------------------
801
801
void AudioEventRTS::adjustForLocalization (AsciiString &strToAdjust)
802
802
{
803
- const char *str = strToAdjust.reverseFind (' \\ ' );
804
- if (!str) {
805
- return ;
803
+ const char *filename = strToAdjust.reverseFind (' \\ ' );
804
+ if (filename) {
805
+ filename += 1 ;
806
+ } else {
807
+ filename = strToAdjust.str ();
806
808
}
807
809
808
- // try the localized version first so that we're guarenteed to get it
810
+ // try the localized version first so that we're guaranteed to get it
809
811
// even if the generic data directory holds a version of the file
810
812
AsciiString localizedFilePath = generateFilenamePrefix (m_eventInfo->m_soundType , TRUE );
811
- AsciiString filename = str;
812
813
localizedFilePath.concat (filename);
813
814
814
815
if (TheFileSystem->doesFileExist (localizedFilePath.str ())) {
815
816
strToAdjust = localizedFilePath;
816
817
}
817
818
// else there was no localized version, so leave the path we received unchanged
818
-
819
- return ;
820
819
}
821
820
822
821
// -------------------------------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments