Mercurial > hg > openttd
changeset 17952:7ec7f33fffac draft
(svn r22761) -Fix (r22708): Make invisible signs un-clickable (Zuu)
author | planetmaker <planetmaker@openttd.org> |
---|---|
date | Fri, 19 Aug 2011 20:54:15 +0000 |
parents | 395ff70781e5 |
children | e47ec55fd8e7 |
files | src/viewport.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1833,6 +1833,9 @@ /* Don't check if the display options are disabled */ if (!HasBit(_display_opt, is_station ? DO_SHOW_STATION_NAMES : DO_SHOW_WAYPOINT_NAMES)) continue; + /* Don't check if competitor signs are not shown and the sign isn't owned by the local company */ + if (!HasBit(_display_opt, DO_SHOW_COMPETITOR_SIGNS) && _local_company != st->owner && st->owner != OWNER_NONE) continue; + if (CheckClickOnViewportSign(vp, x, y, &st->sign)) { if (is_station) { ShowStationViewWindow(st->index); @@ -1854,6 +1857,9 @@ const Sign *si; FOR_ALL_SIGNS(si) { + /* If competitor signs are hidden, don't check signs that aren't owned by local company */ + if (!HasBit(_display_opt, DO_SHOW_COMPETITOR_SIGNS) && _local_company != si->owner) continue; + if (CheckClickOnViewportSign(vp, x, y, &si->sign)) { HandleClickOnSign(si); return true;