summaryrefslogtreecommitdiff
path: root/src/script/squirrel.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:56:59 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:56:59 +0000
commit963802e9a7cb67f51cb7e6ffe9d33a02cfe93821 (patch)
treed8b2d5c1c2d90c7cb1a02403cea942ab52c2e501 /src/script/squirrel.cpp
parent83f2785f54de1c31267c5586464c97fb39f95b5a (diff)
downloadopenttd-963802e9a7cb67f51cb7e6ffe9d33a02cfe93821.tar.xz
(svn r23612) -Add: allow importing libraries in the same way as AI does, only with GS prefix (and in game/library)
Diffstat (limited to 'src/script/squirrel.cpp')
-rw-r--r--src/script/squirrel.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/script/squirrel.cpp b/src/script/squirrel.cpp
index bc02be5f4..da5ed47c2 100644
--- a/src/script/squirrel.cpp
+++ b/src/script/squirrel.cpp
@@ -451,6 +451,7 @@ SQRESULT Squirrel::LoadFile(HSQUIRRELVM vm, const char *filename, SQBool printer
if (file == NULL) file = FioFOpenFile(filename, "rb", AI_LIBRARY_DIR, &size);
} else if (strncmp(this->GetAPIName(), "GS", 2) == 0) {
file = FioFOpenFile(filename, "rb", GAME_DIR, &size);
+ if (file == NULL) file = FioFOpenFile(filename, "rb", GAME_LIBRARY_DIR, &size);
} else {
NOT_REACHED();
}