summaryrefslogtreecommitdiff
path: root/order_gui.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-03-24 17:03:37 +0000
committertruelight <truelight@openttd.org>2005-03-24 17:03:37 +0000
commitd1e158d6f723b6fcb2f1edf1ffac29b81ed307e7 (patch)
tree45d160ba77950eea4f380bd7ff3bbcf6644f651a /order_gui.c
parent625d041e99b5ddd75a8f4cd3a1e11d9923d219f9 (diff)
downloadopenttd-d1e158d6f723b6fcb2f1edf1ffac29b81ed307e7.tar.xz
(svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.h
-Codechange: rewrote some functions while moving waypoint-stuff -Add: added support for 64k waypoints -Fix: made the waypoint struct a bit more logic (no bit-fucking)
Diffstat (limited to 'order_gui.c')
-rw-r--r--order_gui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/order_gui.c b/order_gui.c
index a681a7c3c..0a92caa84 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -13,6 +13,7 @@
#include "command.h"
#include "viewport.h"
#include "depot.h"
+#include "waypoint.h"
static int OrderGetSel(Window *w)
{
@@ -219,7 +220,7 @@ static Order GetOrderCmdFromTile(Vehicle *v, uint tile)
&& (_map5[tile]&0xFE)==0xC4) {
order.type = OT_GOTO_WAYPOINT;
order.flags = 0;
- order.station = GetWaypointByTile(tile);
+ order.station = GetWaypointByTile(tile)->index;
return order;
}
@@ -379,7 +380,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
xy = GetDepot(ord->station)->xy;
break;
case OT_GOTO_WAYPOINT: /* goto waypoint order */
- xy = _waypoints[ord->station].xy;
+ xy = GetWaypoint(ord->station)->xy;
}
if (xy)