forked from mirror/OpenTTD
(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)
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user