diff options
author | peter1138 <peter1138@openttd.org> | 2010-04-04 06:03:52 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2010-04-04 06:03:52 +0000 |
commit | 4441fee0f5a6d5396605b8f787367827b3edcc62 (patch) | |
tree | 49d6c9f3ec7cf749081cb0386d1e11d35922c4e1 | |
parent | 8c4c691448e29fdbfcee274720ac4e4612f0812a (diff) | |
download | openttd-4441fee0f5a6d5396605b8f787367827b3edcc62.tar.xz |
(svn r19557) -Fix (r19502): Missed conversion to checking temporary data broke rail type setting upon changing traction type.
-rw-r--r-- | src/newgrf.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index db035bc5c..35f41bb19 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -658,8 +658,8 @@ static ChangeInfoResult RailVehicleChangeInfo(uint engine, int numinfo, int prop if (_cur_grffile->railtype_max == 0) { /* Use traction type to select between normal and electrified * rail only when no translation list is in place. */ - if (rvi->railtype == RAILTYPE_RAIL && engclass >= EC_ELECTRIC) _gted[e->index].railtypelabel = RAILTYPE_ELECTRIC_LABEL; - if (rvi->railtype == RAILTYPE_ELECTRIC && engclass < EC_ELECTRIC) _gted[e->index].railtypelabel = RAILTYPE_RAIL_LABEL; + if (_gted[e->index].railtypelabel == RAILTYPE_RAIL_LABEL && engclass >= EC_ELECTRIC) _gted[e->index].railtypelabel = RAILTYPE_ELECTRIC_LABEL; + if (_gted[e->index].railtypelabel == RAILTYPE_ELECTRIC_LABEL && engclass < EC_ELECTRIC) _gted[e->index].railtypelabel = RAILTYPE_RAIL_LABEL; } rvi->engclass = engclass; |