summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-04-12 10:31:26 +0000
committertron <tron@openttd.org>2005-04-12 10:31:26 +0000
commit53d30138b2f852e0785226b1aed4c5551bb896eb (patch)
treebe6e75493ba88f6d4885bd8228137a4c769d583f /train_cmd.c
parentbeb185248bee0a2f8d04bb9e92608a8618c75970 (diff)
downloadopenttd-53d30138b2f852e0785226b1aed4c5551bb896eb.tar.xz
(svn r2189) Introduce and use IsCompatibleTrainStationTile()
This should prevent trains, which are longer than the station, to turn around without stopping under certain circumstances and fix speed limit for trains entering a station, when realistic accerlation is used
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c
index c2aa26eaa..b10090732 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 (IsTrainStationTile(tile) && (_map5[tile] & 1) == (_map5[v->tile] & 1));
+ } while (IsCompatibleTrainStationTile(tile, v->tile));
delta_v = v->cur_speed / (station_length + 1);
if (v->max_speed > (v->cur_speed - delta_v))