diff options
author | michi_cc <michi_cc@openttd.org> | 2012-01-05 19:40:34 +0000 |
---|---|---|
committer | michi_cc <michi_cc@openttd.org> | 2012-01-05 19:40:34 +0000 |
commit | ee0fcb25670d1b559cdfdb31e6b7d0da4ec3713d (patch) | |
tree | 6801ecd572e6dd07d0b4b045cdcbd1bafea78617 /src/rail_cmd.cpp | |
parent | 69e197c87fc23e5492f4b59f8e1ba8757d65c41e (diff) | |
download | openttd-ee0fcb25670d1b559cdfdb31e6b7d0da4ec3713d.tar.xz |
(svn r23758) -Feature: [NewGRF] Alternate rail type label list.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r-- | src/rail_cmd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 8d3dec5e5..49a58fe6d 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -99,6 +99,9 @@ RailType AllocateRailType(RailTypeLabel label) /* Set up new rail type */ memcpy(rti, &_railtypes[RAILTYPE_RAIL], sizeof(*rti)); rti->label = label; + /* Clear alternate label list. Can't use Reset() here as that would free + * the data pointer of RAILTYPE_RAIL and not our new rail type. */ + new (&rti->alternate_labels) RailTypeLabelList; /* Make us compatible with ourself. */ rti->powered_railtypes = (RailTypes)(1 << rt); |