From 06ea681b5fa361b34000351bcd248ee46c2a939e Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 17 Jul 2009 20:21:24 +0000 Subject: (svn r16860) -Codechange: introduce a helper to assign a station spec to Waypoints --- src/waypoint_cmd.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src/waypoint_cmd.cpp') diff --git a/src/waypoint_cmd.cpp b/src/waypoint_cmd.cpp index cddd4a7ac..1e8094162 100644 --- a/src/waypoint_cmd.cpp +++ b/src/waypoint_cmd.cpp @@ -190,18 +190,7 @@ CommandCost CmdBuildTrainWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1 SetDepotWaypointReservation(tile, reserved); MarkTileDirtyByTile(tile); - const StationSpec *statspec = GetCustomStationSpec(STAT_CLASS_WAYP, p1); - - if (statspec != NULL) { - 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->spec.spec = NULL; - wp->spec.grfid = 0; - wp->spec.localidx = 0; - } + wp->AssignStationSpec(p1); wp->delete_ctr = 0; wp->build_date = _date; -- cgit v1.2.3-54-g00ecf