mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r15214) -Fix [NoAI]: ignore case for ai/library main script path on windows
This commit is contained in:
parent
fab90386a7
commit
92f5c6b1da
|
@ -89,6 +89,11 @@ void AIScanner::ScanDir(const char *dirname, bool library_scan, bool library_rec
|
|||
ttd_strlcat(main_script, "main.nut", sizeof(main_script));
|
||||
if (!FioCheckFileExists(info_script, AI_DIR) || !FioCheckFileExists(main_script, AI_DIR)) continue;
|
||||
|
||||
#ifdef WIN32
|
||||
/* Windows doesn't care about the case */
|
||||
strtolower(main_script);
|
||||
#endif
|
||||
|
||||
DEBUG(ai, 6, "Loading AI at location '%s'", main_script);
|
||||
this->engine->LoadScript(info_script);
|
||||
} else {
|
||||
|
@ -101,6 +106,11 @@ void AIScanner::ScanDir(const char *dirname, bool library_scan, bool library_rec
|
|||
ttd_strlcat(main_script, "main.nut", sizeof(main_script));
|
||||
if (!FioCheckFileExists(library_script, AI_LIBRARY_DIR) || !FioCheckFileExists(main_script, AI_LIBRARY_DIR)) continue;
|
||||
|
||||
#ifdef WIN32
|
||||
/* Windows doesn't care about the case */
|
||||
strtolower(main_script);
|
||||
#endif
|
||||
|
||||
DEBUG(ai, 6, "Loading AI Library at location '%s'", main_script);
|
||||
this->engine->LoadScript(library_script);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue