summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-11-08 19:23:56 +0000
committermichi_cc <michi_cc@openttd.org>2011-11-08 19:23:56 +0000
commitaca5f7ccf541664816067c96a61f95f623ed9475 (patch)
tree0250ca04d4f2031fcb8ef8d6f9b733ff4ffbed79
parentfbbffe8bcbf2ab93120e157b15e0af2d4bd8e788 (diff)
downloadopenttd-aca5f7ccf541664816067c96a61f95f623ed9475.tar.xz
(svn r23166) -Change: [NewGRF v8] Don't override rail type prop 1B with prop 09.
-rw-r--r--src/newgrf.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 72e977106..41bbc07a6 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -3797,10 +3797,13 @@ static ChangeInfoResult RailTypeChangeInfo(uint id, int numinfo, int prop, ByteR
buf->ReadDWord();
break;
- case 0x09: // Toolbar caption of railtype (sets name as well for backwards compatibility)
- rti->strings.name = rti->strings.toolbar_caption = buf->ReadWord();
+ case 0x09: // Toolbar caption of railtype (sets name as well for backwards compatibility for grf ver < 8)
+ rti->strings.toolbar_caption = buf->ReadWord();
_string_to_grf_mapping[&rti->strings.toolbar_caption] = _cur.grffile->grfid;
- _string_to_grf_mapping[&rti->strings.name] = _cur.grffile->grfid;
+ if (_cur.grffile->grf_version < 8) {
+ rti->strings.name = rti->strings.toolbar_caption;
+ _string_to_grf_mapping[&rti->strings.name] = _cur.grffile->grfid;
+ }
break;
case 0x0A: // Menu text of railtype
@@ -3883,7 +3886,7 @@ static ChangeInfoResult RailTypeChangeInfo(uint id, int numinfo, int prop, ByteR
rti->sorting_order = buf->ReadByte();
break;
- case 0x1B: // Name of railtype (overridden by prop 09)
+ case 0x1B: // Name of railtype (overridden by prop 09 for grf ver < 8)
rti->strings.name = buf->ReadWord();
_string_to_grf_mapping[&rti->strings.name] = _cur.grffile->grfid;
break;