summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2007-01-13 17:42:50 +0000
committerDarkvater <darkvater@openttd.org>2007-01-13 17:42:50 +0000
commit66c5cde9816ae913051c9bb516798cac5aee28e9 (patch)
tree19f7c89441139abe8f37d5f10fbf1953686d9da5 /src/openttd.cpp
parent3f168daee13cd537bf2e07e18e0f03ff654ee0d0 (diff)
downloadopenttd-66c5cde9816ae913051c9bb516798cac5aee28e9.tar.xz
(svn r8106) -Feature/Fix: Add the ability to load savegames when you don't have the exact GRF files in your list. GRF files that are found based on GRFID (but not on matching md5sum) are used instead of disabling them. This does not affect MP games, there you still need an exact match.
-GRF Window colour-codes changed a bit: Static is now grey, and compatible GRF (found locally only based on GRFID) are shown in orange. Compatible GRF's also have an orange status/warning text saying they're not the original the game was saved with. -Loaded games with something amiss regarding GRF's will show an appropiate warning message.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index b07622bf3..3640b0aee 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1188,8 +1188,14 @@ bool AfterLoadGame(void)
// convert road side to my format.
if (_opt.road_side) _opt.road_side = 1;
- /* Check all NewGRFs are present */
- if (!IsGoodGRFConfigList()) return false;
+ /* Check if all NewGRFs are present, we are very strict in MP mode */
+ GCF_Flags gcf_res = IsGoodGRFConfigList();
+ if (_networking && gcf_res != GCF_ACTIVATED) return false;
+
+ switch (gcf_res) {
+ case GCF_COMPATIBLE: _switch_mode_errorstr = STR_NEWGRF_COMPATIBLE_LOAD_WARNING; break;
+ case GCF_NOT_FOUND: _switch_mode_errorstr = STR_NEWGRF_DISABLED_WARNING; break;
+ }
/* Update current year
* must be done before loading sprites as some newgrfs check it */