diff options
author | smatz <smatz@openttd.org> | 2009-05-26 22:45:48 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-26 22:45:48 +0000 |
commit | 5a463c8347fe1e68ab31dda1425e9060d52bfbd6 (patch) | |
tree | 55f5c9de8dcbda6268d003b29af59650594ce27a /src/waypoint_cmd.cpp | |
parent | 7ee882d03f4c41d8659ed82fd5be0d0efbae0a0c (diff) | |
download | openttd-5a463c8347fe1e68ab31dda1425e9060d52bfbd6.tar.xz |
(svn r16442) -Codechange: use new Vehicle accessors at more places
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r-- | src/waypoint_cmd.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index bac5417c3..f2443f69c 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -185,10 +185,8 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1 /* First we update the destination for all vehicles that * have the old waypoint in their orders. */ Vehicle *v; - FOR_ALL_VEHICLES(v) { - if (v->type == VEH_TRAIN && - v->First() == v && - v->current_order.IsType(OT_GOTO_WAYPOINT) && + FOR_ALL_TRAINS(v) { + if (v->First() == v && v->current_order.IsType(OT_GOTO_WAYPOINT) && v->dest_tile == wp->xy) { v->dest_tile = tile; } |