Skip to content

Commit

Permalink
Fix #2293: see-through trees flag is ignored when right-clicking (#2294)
Browse files Browse the repository at this point in the history
* Fix #2293: see-through trees flag is ignored when right-clicking

* Change: track and road are now no longer interacted with when see-through
  • Loading branch information
AaronVanGeffen committed Feb 21, 2024
1 parent 27ade02 commit 5780924
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,8 @@
- Fix: [#2287] Scroll wheel not working in load/save window.
- Fix: [#2290] Construction arrow not being correctly invalidated.
- Fix: [#2291] Signals fail to be placed when selecting one end of large curve track.
- Fix: [#2293] See-through trees flag is ignored when right-clicking a viewport.
- Change: [#2294] Track and road elements are now ignored when they are see-through.

24.01.1 (2024-01-17)
------------------------------------------------------------------------
Expand Down
14 changes: 13 additions & 1 deletion src/OpenLoco/src/Ui/ViewportInteraction.cpp
Expand Up @@ -918,9 +918,21 @@ namespace OpenLoco::Ui::ViewportInteraction
{
interactionsToExclude |= InteractionItemFlags::building | InteractionItemFlags::headquarterBuilding | InteractionItemFlags::industry;
}
if (vp->hasFlags(ViewportFlags::seeThroughTrees))
{
interactionsToExclude |= InteractionItemFlags::tree;
}
if (vp->hasFlags(ViewportFlags::seeThroughScenery))
{
interactionsToExclude |= InteractionItemFlags::tree | InteractionItemFlags::wall;
interactionsToExclude |= InteractionItemFlags::wall;
}
if (vp->hasFlags(ViewportFlags::seeThroughTracks))
{
interactionsToExclude |= InteractionItemFlags::track | InteractionItemFlags::trackExtra | InteractionItemFlags::signal;
}
if (vp->hasFlags(ViewportFlags::seeThroughRoads))
{
interactionsToExclude |= InteractionItemFlags::roadAndTram | InteractionItemFlags::roadAndTramExtra;
}
}
}
Expand Down

0 comments on commit 5780924

Please sign in to comment.