Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes a critical bug that lets you interact through everything #9870

Merged
merged 2 commits into from
Sep 21, 2023

Conversation

HowToLoLu
Copy link
Contributor

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 intended O.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:

@Tsar-Salat
Copy link
Contributor

Speed merge pls maints.

Monkeys leaving genetics open the entire round on Meta because they are next to the Emergency Access West door is driving me insane.

@PowerfulBacon PowerfulBacon added this pull request to the merge queue Sep 21, 2023
Merged via the queue into BeeStation:master with commit 77fe133 Sep 21, 2023
@HowToLoLu HowToLoLu deleted the ohcrap branch November 27, 2023 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Can interact through walls (or windoors) that are not full tile
3 participants