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 | 8b04787d09771797520569e7bff9c570bfb26c18 (patch) | |
tree | 92978704d808ea4d5ae940118d8f47f1957d0450 /src/viewport.cpp | |
parent | 49e69399a6e8b59a4a0b2b95af7a3801585b7fb9 (diff) | |
download | openttd-8b04787d09771797520569e7bff9c570bfb26c18.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); } } |