summaryrefslogtreecommitdiff
path: root/src/newgrf_config.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-06-13 14:11:32 +0000
committerfrosch <frosch@openttd.org>2010-06-13 14:11:32 +0000
commit56fbbdeafd2321a1e1d3a9349d5d07cdaf4d64a7 (patch)
tree414041a43fec98d9e845ef00638e00ee4a476bda /src/newgrf_config.cpp
parent641fc68aa80fc24fa277ae3dc62eec2969bdd26b (diff)
downloadopenttd-56fbbdeafd2321a1e1d3a9349d5d07cdaf4d64a7.tar.xz
(svn r19972) -Change: Use the md5sum from the previous save of the game for BaNaNaS instead of the initial (when the grf was added) md5sum from the gamelog. Neither method is 'better', but this way it is independent from the gamelog.
Diffstat (limited to 'src/newgrf_config.cpp')
-rw-r--r--src/newgrf_config.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp
index 2ed69815c..a77a537eb 100644
--- a/src/newgrf_config.cpp
+++ b/src/newgrf_config.cpp
@@ -299,7 +299,11 @@ GRFListCompatibility IsGoodGRFConfigList(GRFConfig *grfconfig)
if (f != NULL) {
md5sumToString(buf, lastof(buf), c->ident.md5sum);
DEBUG(grf, 1, "NewGRF %08X (%s) not found; checksum %s. Compatibility mode on", BSWAP32(c->ident.grfid), c->filename, buf);
- SetBit(c->flags, GCF_COMPATIBLE);
+ if (!HasBit(c->flags, GCF_COMPATIBLE)) {
+ /* Preserve original_md5sum after it has been assigned */
+ SetBit(c->flags, GCF_COMPATIBLE);
+ memcpy(c->original_md5sum, c->ident.md5sum, sizeof(c->original_md5sum));
+ }
/* Non-found has precedence over compatibility load */
if (res != GLC_NOT_FOUND) res = GLC_COMPATIBLE;