From d3c1be9abd2507fc5e77e5310e97bc1f31c28e65 Mon Sep 17 00:00:00 2001 From: yexo Date: Sat, 31 Jul 2010 09:33:39 +0000 Subject: (svn r20249) -Codechange: change the newgrf name/description from a char* to a GRFText* to make translations possible --- src/network/network_gamelist.cpp | 3 ++- src/network/network_udp.cpp | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/network') diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp index 0ef8b1b2e..97dc0f953 100644 --- a/src/network/network_gamelist.cpp +++ b/src/network/network_gamelist.cpp @@ -20,6 +20,7 @@ #include "network_internal.h" #include "network_udp.h" #include "network_gamelist.h" +#include "../newgrf_text.h" NetworkGameList *_network_game_list = NULL; @@ -175,7 +176,7 @@ void NetworkAfterNewGRFScan() /* Don't know the GRF, so mark game incompatible and the (possibly) * already resolved name for this GRF (another server has sent the * name of the GRF already */ - c->name = FindUnknownGRFName(c->ident.grfid, c->ident.md5sum, true); + AddGRFTextToList(&c->name, FindUnknownGRFName(c->ident.grfid, c->ident.md5sum, true)); c->status = GCS_NOT_FOUND; /* If we miss a file, we're obviously incompatible */ diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp index 9d5ce98a2..dadf0525f 100644 --- a/src/network/network_udp.cpp +++ b/src/network/network_udp.cpp @@ -28,6 +28,7 @@ #include "../company_base.h" #include "../thread/thread.h" #include "../rev.h" +#include "../newgrf_text.h" #include "core/udp.h" @@ -366,11 +367,11 @@ void ClientNetworkUDPSocketHandler::HandleIncomingNetworkGameInfoGRFConfig(GRFCo /* Don't know the GRF, so mark game incompatible and the (possibly) * already resolved name for this GRF (another server has sent the * name of the GRF already */ - config->name = FindUnknownGRFName(config->ident.grfid, config->ident.md5sum, true); + AddGRFTextToList(&config->name, FindUnknownGRFName(config->ident.grfid, config->ident.md5sum, true)); config->status = GCS_NOT_FOUND; } else { config->filename = f->filename; - config->name = f->name; + config->name = DuplicateGRFText(f->name); config->info = f->info; } SetBit(config->flags, GCF_COPY); -- cgit v1.2.3-54-g00ecf