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

Decrease sneak margin to combat phasing through thin walls #13607

Merged
merged 2 commits into from Jul 17, 2023

Conversation

archfan7411
Copy link
Contributor

Fixes #13527

A 1/16th-node-thick wall is 0.625 meters thick, and the previous margin of 0.1 meters meant that these walls could be phased through by sneaking against them. A margin lower than 0.625 prevents this.

I understand that this margin is necessary to prevent players from sneaking off of nodes; however, a value of 0.05 still appears sufficient to prevent this, even at high velocities and low FPS settings.

To do

This PR is Ready for Review.

How to test

While on the interior side of a 1/16th-node-thick wall, press the player against it, and try to sneak through.

A 1/16th-node-thick wall is 0.625 meters thick, and the previous margin of 0.1 meters meant that these walls could be phased through by sneaking against them. A margin lower than 0.625 prevents this.
@SmallJoker
Copy link
Member

SmallJoker commented Jun 19, 2023

Does it also fix 1/32 and 1/64 thick nodeboxes? Asking because it probably does not.

Still, 1/16 is at least better and going down with this threshold can cause issues with collision detection imperfection as seen when glitching through somewhat thin nodes.

@archfan7411
Copy link
Contributor Author

Does it also fix 1/32 and 1/64 thick nodeboxes?

No, it doesn't

going down with this threshold can cause issues with collision detection imperfection as seen when glitching through somewhat thin nodes.

Yep, the question is where that becomes a problem. As I understand it, if the margin value is too low, clients with extremely low FPS going particularly fast could get dropped off the edge of a node while sneaking.

1/16th thick nodeboxes are the thinnest that I've seen in practical use, so I thought that would be a good place to start.

Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described. A specific comment about this particular value would be nice, though. Previously it was just specified as a "best guess" for what could be needed.

Also tested the sneak glitch, which is unaffected by this change.

Copy link
Member

@srifqi srifqi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks good to me, but I also agree with SmallJoker's suggestion about adding comment for the hardcoded value.

@SmallJoker SmallJoker merged commit 9b310a6 into minetest:master Jul 17, 2023
13 checks passed
Wuzzy2 pushed a commit to Wuzzy2/minetest that referenced this pull request Jul 31, 2023
…13607)

A 1/16th-node-thick wall is 0.625 meters thick, and the previous margin of 0.1 meters meant that these walls could be phased through by sneaking against them. A margin lower than 0.625 prevents this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sneak allows walking through very thin nodebox walls
4 participants