summaryrefslogtreecommitdiff
path: root/src/network/network_content.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-23 10:20:29 +0000
committerrubidium <rubidium@openttd.org>2009-01-23 10:20:29 +0000
commit8382b76b0fe9a2b51fd63a831cfbe36117ac4429 (patch)
tree0ad4e75d76388e1bb1993fee5808ef18c0fd18ac /src/network/network_content.cpp
parent67a2dd12e837288e548d71f11604ca9d1c44a7cc (diff)
downloadopenttd-8382b76b0fe9a2b51fd63a831cfbe36117ac4429.tar.xz
(svn r15221) -Change [FS#2574]: only show missing NewGRFs when opening the content download window from a NewGRF list and there are missing NewGRFs, otherwise show just all NewGRFs the system knows.
Diffstat (limited to 'src/network/network_content.cpp')
-rw-r--r--src/network/network_content.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp
index bdb3608ed..fa7f83624 100644
--- a/src/network/network_content.cpp
+++ b/src/network/network_content.cpp
@@ -218,7 +218,7 @@ void ClientNetworkContentSocketHandler::RequestContentList(ContentVector *cv, bo
ContentInfo *ci = *iter;
bool found = false;
for (ContentIterator iter2 = this->infos.Begin(); iter2 != this->infos.End(); iter2++) {
- ContentInfo *ci2 = *iter;
+ ContentInfo *ci2 = *iter2;
if (ci->type == ci2->type && ci->unique_id == ci2->unique_id &&
(!send_md5sum || memcmp(ci->md5sum, ci2->md5sum, sizeof(ci->md5sum)) == 0)) {
found = true;
@@ -746,6 +746,13 @@ void ClientNetworkContentSocketHandler::CheckDependencyState(ContentInfo *ci)
}
}
+void ClientNetworkContentSocketHandler::Clear()
+{
+ for (ContentIterator iter = this->infos.Begin(); iter != this->infos.End(); iter++) delete *iter;
+
+ this->infos.Clear();
+}
+
/*** CALLBACK ***/
void ClientNetworkContentSocketHandler::OnConnect(bool success)