(svn r16442) -Codechange: use new Vehicle accessors at more places

This commit is contained in:
smatz
2009-05-26 22:45:48 +00:00
parent 0c53f04c07
commit e419fe6d3f
16 changed files with 127 additions and 153 deletions

View File

@@ -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;
}