diff -r b25cf31294e9 -r 5a8b295aa345 src/viewport.cpp --- a/src/viewport.cpp Tue Mar 27 21:58:38 2007 +0000 +++ b/src/viewport.cpp Tue Mar 27 23:27:27 2007 +0000 @@ -22,6 +22,7 @@ #include "waypoint.h" #include "variables.h" #include "train.h" +#include "table/station_air.h" #define VIEWPORT_DRAW_MEM (65536 * 2) @@ -659,8 +660,14 @@ if (IS_INSIDE_1D(ti->x, _thd.pos.x, _thd.size.x) && IS_INSIDE_1D(ti->y, _thd.pos.y, _thd.size.y)) { if (_thd.drawstyle & HT_RECT) { - image = SPR_SELECT_TILE + _tileh_to_sprite[ti->tileh]; - DrawSelectionSprite(image, _thd.make_square_red ? PALETTE_SEL_TILE_RED : PAL_NONE, ti); + if ((_thd.airport_template) && + ((byte)(_airport_sections[_thd.airport][((ti->x - _thd.pos.x) / TILE_SIZE ) + ((ti->y - _thd.pos.y) / TILE_SIZE * _thd.size.x / TILE_SIZE)]) != 255)) { + image = SPR_SELECT_TILE + _tileh_to_sprite[ti->tileh]; + DrawSelectionSprite(image, _thd.make_square_red ? PALETTE_SEL_TILE_RED : PAL_NONE, ti); + } else if (!_thd.airport_template) { + image = SPR_SELECT_TILE + _tileh_to_sprite[ti->tileh]; + DrawSelectionSprite(image, _thd.make_square_red ? PALETTE_SEL_TILE_RED : PAL_NONE, ti); + } } else if (_thd.drawstyle & HT_POINT) { // Figure out the Z coordinate for the single dot. byte z = ti->z;