changeset 14950:0fb1f46923ad draft

(svn r19557) -Fix (r19502): Missed conversion to checking temporary data broke rail type setting upon changing traction type.
author peter1138 <peter1138@openttd.org>
date Sun, 04 Apr 2010 06:03:52 +0000
parents 1f6e5cd8d8fa
children 9437b4726bac
files src/newgrf.cpp
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -658,8 +658,8 @@
 				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;