diff options
author | rubidium <rubidium@openttd.org> | 2009-03-04 09:53:31 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-04 09:53:31 +0000 |
commit | 0d8da02ec1ec610931c2fdbe05a29e7ee3a49144 (patch) | |
tree | 9a2c02d0b0de1ad7374ee64afe0beadcb8f2b21f /src/fileio.cpp | |
parent | f0de54bc10d158bbb1ae58b628c0896a56880540 (diff) | |
download | openttd-0d8da02ec1ec610931c2fdbe05a29e7ee3a49144.tar.xz |
(svn r15610) -Change: allow loading of heightmaps and savegames (any form) that are in .tar files
Diffstat (limited to 'src/fileio.cpp')
-rw-r--r-- | src/fileio.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp index a976135d0..3ad29b6f2 100644 --- a/src/fileio.cpp +++ b/src/fileio.cpp @@ -358,7 +358,7 @@ FILE *FioFOpenFile(const char *filename, const char *mode, Subdirectory subdir, } /* We can only use .tar in case of data-dir, and read-mode */ - if (f == NULL && (subdir == DATA_DIR || subdir == AI_DIR || subdir == AI_LIBRARY_DIR) && mode[0] == 'r') { + if (f == NULL && mode[0] == 'r') { static const uint MAX_RESOLVED_LENGTH = 2 * (100 + 100 + 155) + 1; // Enough space to hold two filenames plus link. See 'TarHeader'. char resolved_name[MAX_RESOLVED_LENGTH]; @@ -777,6 +777,8 @@ void ScanForTarFiles() num += ScanPathForTarFiles(path, strlen(path)); FioAppendDirectory(path, MAX_PATH, sp, AI_LIBRARY_DIR); num += ScanPathForTarFiles(path, strlen(path)); + FioAppendDirectory(path, MAX_PATH, sp, SCENARIO_DIR); + num += ScanPathForTarFiles(path, strlen(path)); } DEBUG(misc, 1, "Scan complete, found %d files", num); } |