diff options
author | alberth <alberth@openttd.org> | 2010-12-25 19:58:50 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-12-25 19:58:50 +0000 |
commit | d2564a3e56aca3ca6b253eb2b2c8f4911102d498 (patch) | |
tree | 90a96e6d17f946c0bf680d39b6a551dcd74a2c3b | |
parent | 2c41b8ee97f4b6211a4cb88dc4df460b615470fb (diff) | |
download | openttd-d2564a3e56aca3ca6b253eb2b2c8f4911102d498.tar.xz |
(svn r21638) -Codechange (r1): Simplify testing that outersize.x is bigger than 0.
-rw-r--r-- | src/viewport.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp index 3fcc45125..be0118aad 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1040,8 +1040,7 @@ static void DrawTileSelection(const TileInfo *ti) } /* Check if it's inside the outer area? */ - if (!is_redsq && _thd.outersize.x && - _thd.size.x < _thd.size.x + _thd.outersize.x && + if (!is_redsq && _thd.outersize.x > 0 && IsInsideBS(ti->x, _thd.pos.x + _thd.offs.x, _thd.size.x + _thd.outersize.x) && IsInsideBS(ti->y, _thd.pos.y + _thd.offs.y, _thd.size.y + _thd.outersize.y)) { /* Draw a blue rect. */ |