From 936477c323f2c6cf1a4893ad7cd4a747c2ac5450 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 1 Jan 2010 18:10:10 +0000 Subject: [PATCH] (svn r18679) -Fix (r16993): tile area of waypoints wasn't correctly given to NewGRFs in case of multi tile waypoints --- src/station_cmd.cpp | 1 - src/waypoint.cpp | 12 +++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index e9d9dba117..df57900f49 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -394,7 +394,6 @@ void Station::GetTileArea(TileArea *ta, StationType type) const case STATION_DOCK: case STATION_OILRIG: - case STATION_BUOY: ta->tile = this->dock_tile; break; diff --git a/src/waypoint.cpp b/src/waypoint.cpp index eeb3bcccf7..bc7bf2975f 100644 --- a/src/waypoint.cpp +++ b/src/waypoint.cpp @@ -33,16 +33,18 @@ void DrawWaypointSprite(int x, int y, int stat_id, RailType railtype) void Waypoint::GetTileArea(TileArea *ta, StationType type) const { switch (type) { - case STATION_BUOY: case STATION_WAYPOINT: + *ta = this->train_station; + return; + + case STATION_BUOY: + ta->tile = this->xy; + ta->w = 1; + ta->h = 1; break; default: NOT_REACHED(); } - - ta->tile = this->xy; - ta->w = 1; - ta->h = 1; } Waypoint::~Waypoint()