summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-02-12 03:05:27 +0000
committerbelugas <belugas@openttd.org>2008-02-12 03:05:27 +0000
commitf4334301e89b0dfcaace437de6202764e5f9b537 (patch)
tree1f3b08c93867a3ece67fea36d353dcbdb2385576 /src/newgrf.cpp
parentb0b929ce4258e70fd0482a4bf9b1fac8330edcfe (diff)
downloadopenttd-f4334301e89b0dfcaace437de6202764e5f9b537.tar.xz
(svn r12118) -Codechange: Put the two descriptions of bridges in an array instead of two single variables, following the transport type it represents
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp10
1 files changed, 3 insertions, 7 deletions
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: