Only add DFN to search path if not a subdir of the other path

feature/opengl3
kaetemi 5 years ago
parent dd1043eaae
commit 2faa1d7ab8

@ -103,7 +103,9 @@ int main(int nNbArg, char **ppArgs)
// add search paths
CPath::addSearchPath(leveldesignDir, true, false);
CPath::addSearchPath(dfnDir, true, false);
std::string relativeDfnDir = dfnDir; // only add dfn if not a subdir of leveldesignDir
if (!CPath::makePathRelative(leveldesignDir, dfnDir) || relativeDfnDir.size() < 2 || (relativeDfnDir[0] == '.' && relativeDfnDir[1] == '.'))
CPath::addSearchPath(dfnDir, true, false);
// create the audio mixer
UAudioMixer *audioMixer = UAudioMixer::createAudioMixer();

@ -82,7 +82,9 @@ int main(int nNbArg, char **ppArgs)
// add search paths
CPath::addSearchPath(leveldesignDir, true, false);
CPath::addSearchPath(dfnDir, true, false);
std::string relativeDfnDir = dfnDir; // only add dfn if not a subdir of leveldesignDir
if (!CPath::makePathRelative(leveldesignDir, dfnDir) || relativeDfnDir.size() < 2 || (relativeDfnDir[0] == '.' && relativeDfnDir[1] == '.'))
CPath::addSearchPath(dfnDir, true, false);
// build the sound bank
UAudioMixer::buildSoundBank(exportDir);

Loading…
Cancel
Save