diff options
author | Yexo <Yexo@openttd.org> | 2009-01-19 15:06:11 +0000 |
---|---|---|
committer | Yexo <Yexo@openttd.org> | 2009-01-19 15:06:11 +0000 |
commit | bc5c4a2ae277368f357dc721ceda816a90d209ba (patch) | |
tree | 92978704d808ea4d5ae940118d8f47f1957d0450 /src/viewport.cpp | |
parent | 27507f91be82794e8f58a855f4cfa15fc6547034 (diff) | |
download | openttd-bc5c4a2ae277368f357dc721ceda816a90d209ba.tar.xz |
(svn r15151) -Fix: tile 0 can now be highlighted as error tile
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r-- | src/viewport.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp index 9eeb08f2b..d507772b4 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -878,7 +878,7 @@ static void DrawAutorailSelection(const TileInfo *ti, uint autorail_type) static void DrawTileSelection(const TileInfo *ti) { /* Draw a red error square? */ - bool is_redsq = _thd.redsq != 0 && _thd.redsq == ti->tile; + bool is_redsq = _thd.redsq == ti->tile; if (is_redsq) DrawTileSelectionRect(ti, PALETTE_TILE_RED_PULSATING); /* no selection active? */ @@ -2085,8 +2085,8 @@ void SetRedErrorSquare(TileIndex tile) _thd.redsq = tile; if (tile != old) { - if (tile != 0) MarkTileDirtyByTile(tile); - if (old != 0) MarkTileDirtyByTile(old); + if (tile != INVALID_TILE) MarkTileDirtyByTile(tile); + if (old != INVALID_TILE) MarkTileDirtyByTile(old); } } |