summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-01 18:10:10 +0000
committerrubidium <rubidium@openttd.org>2010-01-01 18:10:10 +0000
commit936477c323f2c6cf1a4893ad7cd4a747c2ac5450 (patch)
tree41970d9a3df1c429f185b8a5aa76ea29404b0087 /src
parent0bc292056debfa4f06b457d03f3edf3eabc34ebe (diff)
downloadopenttd-936477c323f2c6cf1a4893ad7cd4a747c2ac5450.tar.xz
(svn r18679) -Fix (r16993): tile area of waypoints wasn't correctly given to NewGRFs in case of multi tile waypoints
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp1
-rw-r--r--src/waypoint.cpp12
2 files changed, 7 insertions, 6 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index e9d9dba11..df57900f4 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 eeb3bcccf..bc7bf2975 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()