summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.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_gui.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_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index 9c9133a34..a3e6b5261 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -604,9 +604,9 @@ struct NewGRFWindow : public QueryStringBaseWindow {
ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR);
} else {
#if defined(ENABLE_NETWORK)
- this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window
+ this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window
- /* Only show the things in the current list, or everything when nothing's selected */
+ /* Only show the things in the current list, or everything when nothing's selected */
ContentVector cv;
for (const GRFConfig *c = this->actives; c != NULL; c = c->next) {
if (c->status != GCS_NOT_FOUND && !HasBit(c->flags, GCF_COMPATIBLE)) continue;
@@ -616,8 +616,7 @@ struct NewGRFWindow : public QueryStringBaseWindow {
ci->state = ContentInfo::DOES_NOT_EXIST;
ttd_strlcpy(ci->name, c->GetName(), lengthof(ci->name));
ci->unique_id = BSWAP32(c->ident.grfid);
- memcpy(ci->md5sum, c->ident.md5sum, sizeof(ci->md5sum));
- if (HasBit(c->flags, GCF_COMPATIBLE)) GamelogGetOriginalGRFMD5Checksum(c->ident.grfid, ci->md5sum);
+ memcpy(ci->md5sum, HasBit(c->flags, GCF_COMPATIBLE) ? c->original_md5sum : c->ident.md5sum, sizeof(ci->md5sum));
*cv.Append() = ci;
}
ShowNetworkContentListWindow(cv.Length() == 0 ? NULL : &cv, CONTENT_TYPE_NEWGRF);