summaryrefslogtreecommitdiff
path: root/src/waypoint.cpp
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/waypoint.cpp
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/waypoint.cpp')
-rw-r--r--src/waypoint.cpp12
1 files changed, 7 insertions, 5 deletions
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()