summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-12-29 12:42:59 +0000
committertron <tron@openttd.org>2005-12-29 12:42:59 +0000
commit246c126d250171bd69f66080dbc25fafef6a46d2 (patch)
tree471052da802f2cc20f631ca0291f7337c78cd45d /station_cmd.c
parent1ffc70079787954dda1182de89eca25f36837490 (diff)
downloadopenttd-246c126d250171bd69f66080dbc25fafef6a46d2.tar.xz
(svn r3353) Simplify the automatic length adjustment algorithm for replacing trains: Use the length of the train before the replacement as reference length
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 4eecdeff0..dcd8e961a 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -1065,6 +1065,11 @@ int32 CmdBuildRailroadStation(int x, int y, uint32 flags, uint32 p1, uint32 p2)
return cost;
}
+static bool TileBelongsToRailStation(const Station *st, TileIndex tile)
+{
+ return IsTileType(tile, MP_STATION) && _m[tile].m2 == st->index && _m[tile].m5 < 8;
+}
+
static void MakeRailwayStationAreaSmaller(Station *st)
{
uint w = st->trainst_w;