summaryrefslogtreecommitdiff
path: root/src/waypoint_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-16 20:29:08 +0000
committerrubidium <rubidium@openttd.org>2009-07-16 20:29:08 +0000
commit665fa7f9c170774f6a640ecf381f714b50b6b174 (patch)
treec50cc3aa827d9d7f6d3db036b1b2cee952bd3cb6 /src/waypoint_cmd.cpp
parentdea1144bcb52b6c5f2c985395b2775cedcbff5ce (diff)
downloadopenttd-665fa7f9c170774f6a640ecf381f714b50b6b174.tar.xz
(svn r16851) -Codechange: use StationSpecList in waypoint too
Diffstat (limited to 'src/waypoint_cmd.cpp')
-rw-r--r--src/waypoint_cmd.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp
index 493953020..6bf080912 100644
--- a/src/waypoint_cmd.cpp
+++ b/src/waypoint_cmd.cpp
@@ -185,24 +185,22 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1
}
wp->owner = owner;
- const StationSpec *statspec;
-
bool reserved = HasBit(GetTrackReservation(tile), AxisToTrack(axis));
MakeRailWaypoint(tile, owner, axis, GetRailType(tile), wp->index);
SetDepotWaypointReservation(tile, reserved);
MarkTileDirtyByTile(tile);
- statspec = GetCustomStationSpec(STAT_CLASS_WAYP, p1);
+ const StationSpec *statspec = GetCustomStationSpec(STAT_CLASS_WAYP, p1);
if (statspec != NULL) {
- wp->stat_id = p1;
- wp->grfid = statspec->grffile->grfid;
- wp->localidx = statspec->localidx;
+ wp->spec.spec = statspec;
+ wp->spec.grfid = statspec->grffile->grfid;
+ wp->spec.localidx = statspec->localidx;
} else {
/* Specified custom graphics do not exist, so use default. */
- wp->stat_id = 0;
- wp->grfid = 0;
- wp->localidx = 0;
+ wp->spec.spec = NULL;
+ wp->spec.grfid = 0;
+ wp->spec.localidx = 0;
}
wp->delete_ctr = 0;