From 665fa7f9c170774f6a640ecf381f714b50b6b174 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 16 Jul 2009 20:29:08 +0000 Subject: (svn r16851) -Codechange: use StationSpecList in waypoint too --- src/waypoint_cmd.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/waypoint_cmd.cpp') 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; -- cgit v1.2.3-54-g00ecf