summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ0an Josep <juanjo.ng.83@gmail.com>2018-07-28 15:59:37 +0200
committerPatric Stout <truebrain@openttd.org>2018-08-04 08:59:22 +0200
commit67f6bcdc9bb7dcd2424d41be9c3ce44c8ebdcf37 (patch)
treef03a2d7b23586ca5f141fc5179b7ba3dd1f8f82a
parenta53f13cff633962108db52da09d4f54ae6946f10 (diff)
downloadopenttd-67f6bcdc9bb7dcd2424d41be9c3ce44c8ebdcf37.tar.xz
Fix #6805: Update CmdBuilRailWaypoint bits.
-rw-r--r--src/waypoint_cmd.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index 54489fa45..639dce13b 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -148,7 +148,8 @@ extern CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta,
* @param start_tile northern most tile where waypoint will be built
* @param flags type of operation
* @param p1 various bitstuffed elements
- * - p1 = (bit 4) - orientation (Axis)
+ * - p1 = (bit 0- 5) - railtype (not used)
+ * - p1 = (bit 6) - orientation (Axis)
* - p1 = (bit 8-15) - width of waypoint
* - p1 = (bit 16-23) - height of waypoint
* - p1 = (bit 24) - allow waypoints directly adjacent to other waypoints.
@@ -161,7 +162,7 @@ extern CommandCost CanExpandRailStation(const BaseStation *st, TileArea &new_ta,
CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
/* Unpack parameters */
- Axis axis = Extract<Axis, 4, 1>(p1);
+ Axis axis = Extract<Axis, 6, 1>(p1);
byte width = GB(p1, 8, 8);
byte height = GB(p1, 16, 8);
bool adjacent = HasBit(p1, 24);