(svn r21814) -Fix/Add: Check GRF version from action 8, and disallow usage of GRFs with versions above 7.

This commit is contained in:
frosch
2011-01-15 21:13:47 +00:00
parent 0152ea53c8
commit 56d06b6ef8
6 changed files with 23 additions and 10 deletions

View File

@@ -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";
}