summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-01-30 22:00:25 +0000
committerpeter1138 <peter1138@openttd.org>2007-01-30 22:00:25 +0000
commitd838a477e21ff1fe5c54e198462dd006d51227f7 (patch)
treec418b779a7fc8f848d7d3cae56f927a887898c5c /src
parent8933ffd9acf617cbb30ef3f1abcac166d3f4f97b (diff)
downloadopenttd-d838a477e21ff1fe5c54e198462dd006d51227f7.tar.xz
(svn r8465) -Regression (r8455): Switching from dual to single head should switch to wagon if power is zero. .Or something.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index b8a5b8073..7d3277a0e 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -327,7 +327,8 @@ static bool RailVehicleChangeInfo(uint engine, int numinfo, int prop, byte **buf
rvi[i].power *= 2;
rvi[i].running_cost_base *= 2;
}
- rvi[i].railveh_type = RAILVEH_SINGLEHEAD;
+ rvi[i].railveh_type = rvi[i].power == 0 ?
+ RAILVEH_WAGON : RAILVEH_SINGLEHEAD;
}
}
break;