diff options
author | Darkvater <Darkvater@openttd.org> | 2005-05-09 22:33:00 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2005-05-09 22:33:00 +0000 |
commit | 6d349b6284f2d7fe65517b03bb310eb508eb3d3a (patch) | |
tree | adf0a3467d8519f1ef67e90a0a06731ea8c4dc1a /tunnelbridge_cmd.c | |
parent | f9fdddb0ad04bb3e1c441884696b08182b82e447 (diff) | |
download | openttd-6d349b6284f2d7fe65517b03bb310eb508eb3d3a.tar.xz |
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
- CodeChange: changed the airport gui airport-type checking. Added function GetValidAirports() that returns bitmasked availibility, is also used for checking.
- CodeChange: to check tree-planting, 2 const arrays have been moved to table/tree_land.h (type and count)
- CodeChange: added IsTownIndex() in following of IsStationIndex(), etc.
- Fix (regression): road tunnels did not work anymore, forgot that their type was 0x200 (documented now)
Diffstat (limited to 'tunnelbridge_cmd.c')
-rw-r--r-- | tunnelbridge_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c index 6cc1f946e..3fd0c92ca 100644 --- a/tunnelbridge_cmd.c +++ b/tunnelbridge_cmd.c @@ -533,7 +533,7 @@ static int32 DoBuildTunnel(int x, int y, int x2, int y2, uint32 flags, uint exc_ /** Build Tunnel. * @param x,y start tile coord of tunnel - * @param p1 railtype + * @param p1 railtype, 0x200 for road tunnel * @param p2 unused (XXX - ptr to uint that recieves end tile; wtf?????) */ int32 CmdBuildTunnel(int x, int y, uint32 flags, uint32 p1, uint32 p2) @@ -547,7 +547,7 @@ int32 CmdBuildTunnel(int x, int y, uint32 flags, uint32 p1, uint32 p2) SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); - if (!ValParamRailtype(p1)) return CMD_ERROR; + if (p1 != 0x200 && !ValParamRailtype(p1)) return CMD_ERROR; _build_tunnel_railtype = (byte)(p1 & 0xFF); _build_tunnel_bh = (byte)(p1 >> 8); |