summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-23 18:27:53 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-23 18:27:53 +0000
commitbaebc8d47e33e0c0a9a5cd3943afabeafabc19d9 (patch)
tree0f5c1d602bdc27f39eadaa2e27cc65bc3cab160b /newgrf.c
parentb54ebaba70f211044ba8aa39ee13599b3945b2ff (diff)
downloadopenttd-baebc8d47e33e0c0a9a5cd3943afabeafabc19d9.tar.xz
(svn r4550) - NewGRF: update string system to new rules: a grf version of less than 6 uses the old scheme, of 7 or more uses the new scheme. (Moving targets, yay...)
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/newgrf.c b/newgrf.c
index 584f671e3..a38dceb49 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -1725,6 +1725,7 @@ static void VehicleNewName(byte *buf, int len)
uint16 id;
uint16 endid;
const char* name;
+ bool new_scheme = _cur_grffile->grf_version < 7;
check_length(len, 6, "VehicleNewName");
buf++;
@@ -1754,7 +1755,7 @@ static void VehicleNewName(byte *buf, int len)
case GSF_ROAD:
case GSF_SHIP:
case GSF_AIRCRAFT: {
- StringID string = AddGRFString(_cur_grffile->grfid, id, lang, name);
+ StringID string = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name);
if (id < TOTAL_NUM_ENGINES) SetCustomEngineName(id, string);
break;
}