summaryrefslogtreecommitdiff
path: root/src/order_cmd.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-08-23 02:15:46 +0000
committerbelugas <belugas@openttd.org>2008-08-23 02:15:46 +0000
commit7dc212edeba11703d3b8a5f4105dbb0102f122ab (patch)
tree3c9c32817a645ea313b3ef2cc9da69a40f7820ea /src/order_cmd.cpp
parentf625ecbeba53c4d25cd2ad2755924448522af8e9 (diff)
downloadopenttd-7dc212edeba11703d3b8a5f4105dbb0102f122ab.tar.xz
(svn r14135) -Codechange: Add owner to waypoints. Previously, it was guessed from rail underneath it.
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r--src/order_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index b71fbc8c1..814d819b4 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -442,7 +442,7 @@ CommandCost CmdInsertOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (!IsValidWaypointID(new_order.GetDestination())) return CMD_ERROR;
const Waypoint *wp = GetWaypoint(new_order.GetDestination());
- if (!CheckOwnership(GetTileOwner(wp->xy))) return CMD_ERROR;
+ if (!CheckOwnership(wp->owner)) return CMD_ERROR;
/* Order flags can be any of the following for waypoints:
* [non-stop]