Fixes a critical bug that lets you interact through everything #9870
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About The Pull Request
Fixes #9867
There was an miswritten if statement introduced with #9700. What was at fault was a miswritten if statement in the ClickCross proc of
code/_onclick/adjacent.dm
This was the if statement written when porting:
O == target || O == mover || (O.pass_flags_self & LETPASSTHROW|LETPASSCLICKS)
This is the if statement from what it was porting DaedalusDock/daedalusdock#106
O == target || O == mover || (O.pass_flags_self & (LETPASSTHROW|LETPASSCLICKS))
Notably, that last part is what's causing the issue, because
O.pass_flags_self & LETPASSTHROW|LETPASSCLICKS
evaluates to(O.pass_flags_self & LETPASSTHROW) | LETPASSCLICKS
, instead of the intendedO.pass_flags_self & (LETPASSTHROW|LETPASSCLICKS)
, which would always evaluate to true.TL;DR, A lack of parenthesis in the right place can make all the difference in the world
Why It's Good For The Game
Fixes what might be the most exploitable thing currently in the game, and only with a pair of these
( )
Testing Photographs and Procedure
Screenshots&Videos
CrossClick.mp4
Changelog
🆑
fix: You can no longer interact with stuff through windows, windoors, and anything that should've blocked you from interacting really.
/:cl: