mirror of https://github.com/OpenTTD/OpenTTD
(svn r22030) -Cleanup: dead code in NetworkGameWindow::OnInvalidateData (adf88)
parent
e1eeca6440
commit
5f7439a00f
|
@ -791,37 +791,9 @@ public:
|
||||||
|
|
||||||
virtual void OnInvalidateData(int data)
|
virtual void OnInvalidateData(int data)
|
||||||
{
|
{
|
||||||
switch (data) {
|
if (data == 1) {
|
||||||
/* Remove the selection */
|
|
||||||
case 1:
|
|
||||||
this->server = NULL;
|
this->server = NULL;
|
||||||
this->list_pos = SLP_INVALID;
|
this->list_pos = SLP_INVALID;
|
||||||
break;
|
|
||||||
|
|
||||||
/* Reiterate the whole server list as we downloaded some files */
|
|
||||||
case 2:
|
|
||||||
for (NetworkGameList **iter = this->servers.Begin(); iter != this->servers.End(); iter++) {
|
|
||||||
NetworkGameList *item = *iter;
|
|
||||||
bool missing_grfs = false;
|
|
||||||
for (GRFConfig *c = item->info.grfconfig; c != NULL; c = c->next) {
|
|
||||||
if (c->status != GCS_NOT_FOUND) continue;
|
|
||||||
|
|
||||||
const GRFConfig *f = FindGRFConfig(c->ident.grfid, FGCM_EXACT, c->ident.md5sum);
|
|
||||||
if (f == NULL) {
|
|
||||||
missing_grfs = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
c->filename = f->filename;
|
|
||||||
CleanUpGRFText(c->name);
|
|
||||||
c->name = DuplicateGRFText(f->name);
|
|
||||||
c->info = f->info;
|
|
||||||
c->status = GCS_UNKNOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!missing_grfs) item->info.compatible = item->info.version_compatible;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
this->servers.ForceRebuild();
|
this->servers.ForceRebuild();
|
||||||
this->SetDirty();
|
this->SetDirty();
|
||||||
|
|
Loading…
Reference in New Issue