diff options
author | frosch <frosch@openttd.org> | 2011-01-15 21:13:47 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-01-15 21:13:47 +0000 |
commit | 6e4dd5615878c658cf687a73dc1990f9e903df86 (patch) | |
tree | 29eddd4bfb56a83ab7ba2e131372d79535fb8b79 /src/settings.cpp | |
parent | 4d8a93c870428d8cdffad9a453aef91a1365f97e (diff) | |
download | openttd-6e4dd5615878c658cf687a73dc1990f9e903df86.tar.xz |
(svn r21814) -Fix/Add: Check GRF version from action 8, and disallow usage of GRFs with versions above 7.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index 1ba1d3b5c..fde955990 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -1352,7 +1352,7 @@ static GRFConfig *GRFLoadConfig(IniFile *ini, const char *grpname, bool is_stati } /* Check if item is valid */ - if (!FillGRFDetails(c, is_static)) { + if (!FillGRFDetails(c, is_static) || HasBit(c->flags, GCF_INVALID)) { const char *msg; if (c->status == GCS_NOT_FOUND) { @@ -1361,6 +1361,8 @@ static GRFConfig *GRFLoadConfig(IniFile *ini, const char *grpname, bool is_stati msg = "unsafe for static use"; } else if (HasBit(c->flags, GCF_SYSTEM)) { msg = "system NewGRF"; + } else if (HasBit(c->flags, GCF_INVALID)) { + msg = "incompatible to this version of OpenTTD"; } else { msg = "unknown"; } |