summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-04-11 14:59:06 +0000
committercelestar <celestar@openttd.org>2005-04-11 14:59:06 +0000
commita714444a8eed4e9eb7cba177026171e034ce3b7f (patch)
treed17d6fc4e3b1943d2bf13d3abb51448c055c2612
parent6409e6efaf89c1b6c4d6730cb8a6c774fa45c937 (diff)
downloadopenttd-a714444a8eed4e9eb7cba177026171e034ce3b7f.tar.xz
(svn r2180) -Fix: Deceleration code now only takes into account rail station tiles for computing the remaining distance
-rw-r--r--train_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 89efa842c..a25e89dbd 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -154,7 +154,7 @@ static int GetTrainAcceleration(Vehicle *v, bool mode)
do {
station_length++;
tile = TILE_ADD(tile, TileOffsByDir(v->direction / 2));
- } while (IsTileType(tile, MP_STATION));
+ } while (IsTrainStationTile(tile) && (_map5[tile] & 1) == (_map5[v->tile] & 1));
delta_v = v->cur_speed / (station_length + 1);
if (v->max_speed > (v->cur_speed - delta_v))