From f4334301e89b0dfcaace437de6202764e5f9b537 Mon Sep 17 00:00:00 2001 From: belugas Date: Tue, 12 Feb 2008 03:05:27 +0000 Subject: (svn r12118) -Codechange: Put the two descriptions of bridges in an array instead of two single variables, following the transport type it represents --- src/newgrf.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/newgrf.cpp') diff --git a/src/newgrf.cpp b/src/newgrf.cpp index e037f0114..4a6bb6c83 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -1250,14 +1250,10 @@ static bool BridgeChangeInfo(uint brid, int numinfo, int prop, byte **bufp, int if (newone != STR_UNDEFINED) bridge->material = newone; } break; - case 0x11: { // description of bridge with rails + case 0x11: // description of bridge with rails or roads + case 0x12: { StringID newone = GetGRFStringID(_cur_grffile->grfid, grf_load_word(&buf)); - if (newone != STR_UNDEFINED) bridge->name_rail = newone; - } break; - - case 0x12: { // description of bridge with roads - StringID newone = GetGRFStringID(_cur_grffile->grfid, grf_load_word(&buf)); - if (newone != STR_UNDEFINED) bridge->name_road = newone; + if (newone != STR_UNDEFINED) bridge->transport_name[prop - 0x11] = newone; } break; default: -- cgit v1.2.3-54-g00ecf