summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2005-05-09 13:26:15 +0000
committerDarkvater <darkvater@openttd.org>2005-05-09 13:26:15 +0000
commit2b96754673a964ba73a7ad5e508a8dfb31a0c701 (patch)
treeccbac52281216762b9143a0756b6a957443b581d /station_cmd.c
parent5f6de3e47c1418388efeabef2a312f689a288175 (diff)
downloadopenttd-2b96754673a964ba73a7ad5e508a8dfb31a0c701.tar.xz
(svn r2285) - Codechange: Fix up some of the missing things from server-checking; namely bridge-type, bridge-length, dragged end-tile (bridge/station), station_spread
- Fix: [ 1197256 ] max station spread patch < 7 does not work. Station spread was not taking into account when not using drag&drop. Fix this up, and add a callback to the settings window to immediately reflect the changes.
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/station_cmd.c b/station_cmd.c
index d7cc53116..3b13c0fdb 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -918,7 +918,7 @@ static void GetStationLayout(byte *layout, int numtracks, int plat_len, StationS
}
/** Build railroad station
- * @param x_org,y_org starting position of station dragging/placement
+ * @param x,y starting position of station dragging/placement
* @param p1 various bitstuffed elements
* - p1 = (bit 0) - orientation (p1 & 1)
* - p1 = (bit 8-15) - number of tracks (p1 >> 8) & 0xFF)
@@ -960,6 +960,8 @@ int32 CmdBuildRailroadStation(int x, int y, uint32 flags, uint32 p1, uint32 p2)
h_org = numtracks;
}
+ if (h_org > _patches.station_spread || w_org > _patches.station_spread) return CMD_ERROR;
+
// these values are those that will be stored in train_tile and station_platforms
finalvalues[0] = tile_org;
finalvalues[1] = w_org;