summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-08-15 19:59:48 +0000
committerfrosch <frosch@openttd.org>2010-08-15 19:59:48 +0000
commit236737b2f29cc9ddd129a963d6a312a5c4ffe78b (patch)
treeb7e7e718745ee22a3540dfc0252ef00b27ccdced /src/rail_cmd.cpp
parent57a098bcccf8bbd5de95ae56d8f64e1427523844 (diff)
downloadopenttd-236737b2f29cc9ddd129a963d6a312a5c4ffe78b.tar.xz
(svn r20505) -Feature [FS#3978]: Allow changing visual effect when changing railtype.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r--src/rail_cmd.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index cab0a304c..a2dcf650d 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1380,7 +1380,6 @@ static Vehicle *UpdateTrainPowerProc(Vehicle *v, void *data)
{
if (v->type != VEH_TRAIN) return NULL;
- /* Similar checks as in Train::PowerChanged() */
TrainList *affected_trains = static_cast<TrainList*>(data);
affected_trains->Include(Train::From(v)->First());
@@ -1583,8 +1582,7 @@ CommandCost CmdConvertRail(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
if (flags & DC_EXEC) {
/* Railtype changed, update trains as when entering different track */
for (Train **v = affected_trains.Begin(); v != affected_trains.End(); v++) {
- (*v)->PowerChanged();
- (*v)->UpdateAcceleration();
+ (*v)->RailtypeChanged();
}
}