summaryrefslogtreecommitdiff
path: root/waypoint.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-08-22 17:13:49 +0000
committertruelight <truelight@openttd.org>2006-08-22 17:13:49 +0000
commitbdc1d681a77ab4ca3342023c5314b565c2e21b86 (patch)
tree6fd89f2a96b8f71b4b34dda81300e4dd18bd4e6e /waypoint.c
parent8d436dee6975b5fccd26de5c3e2429414df63776 (diff)
downloadopenttd-bdc1d681a77ab4ca3342023c5314b565c2e21b86.tar.xz
(svn r6052) -Codechange: change OrderType (order->type) in a typedef
-Codechange: renamed DeleteDestinationFromVehicleOrder to RemoveOrderFromAllVehicles to reflect his function better -Codechange: changed the params of RemoveOrderFromAllVehicles, to avoid unneeded variable-creation
Diffstat (limited to 'waypoint.c')
-rw-r--r--waypoint.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/waypoint.c b/waypoint.c
index 378c959cc..ca9c9987f 100644
--- a/waypoint.c
+++ b/waypoint.c
@@ -247,13 +247,9 @@ int32 CmdBuildTrainWaypoint(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* Internal handler to delete a waypoint */
static void DoDeleteWaypoint(Waypoint *wp)
{
- Order order;
-
wp->xy = 0;
- order.type = OT_GOTO_WAYPOINT;
- order.station = wp->index;
- DeleteDestinationFromVehicleOrder(order);
+ RemoveOrderFromAllVehicles(OT_GOTO_WAYPOINT, wp->index);
if (wp->string != STR_NULL) DeleteName(wp->string);