-
Notifications
You must be signed in to change notification settings - Fork 2k
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
New move code: Only snap to collision box only on fall #11367
Conversation
@NeroBurner @RichardTry Does this work as you'd expect? |
It works half of the time. During the jump while going up it works as expected. After reaching the top and starting falling down the "teleport" comes into effect |
Yes, that seems entirely as intended so that you could adhere to nearby nodes to prevent falling down. Modifying that would imply a breaking change to the gameplay. |
The correct behavior seems to be like this: Sneak prevents you from falling just if you touching (standing on) ground (edge), sneak should not prevent you from falling if you "fly" over the edge. |
@RichardTry yes I think that's what I would expect building works for me using IrrlichtMt as a subdirectory (also when rebasing the PR commit on current master) git clone --depth 1 https://github.com/minetest/irrlicht.git lib/irrlichtmt |
I found out that sneaking "teleports" me to the top of node, no matter which collision box it has. This should be the reason of a problem. But I still can't compile:
|
To test this PR, you'll either need an Irrlicht mt1 clone or you could apply the patches to current master (it's literally a 1-liner change!). example script. |
4962c13
to
bfd7322
Compare
I was not able to find a way where this actually changes gameplay while trying for a few minutes. I'd be wary of changinng this though – if anything relies on it, it is most likely parkour maps, where this change may turn hard jumps into impossible jumps without anyone noticing. |
I think I figured it out: Snapping when jumping up is probably a part of the “sneak jump” feature, which allows players to jump/teleport on a node that is normally too high to jump on if they press sneak, therefore having a way to “jump a bit more”. This is mainly used with fences and walls. TL;DR: Please do not merge this. |
@SmallJoker the issue you had mentioned in the very beginning it's been closed as "Not a bug" + Erlehmann comment. Should I close this? |
@Zughy Whereas it might not be a bug, I consider this as a movement improvement. Snapping is only relevant to get onto nodes while falling, hence it should only happen in that case. @erlehmann Actually you're too late about this. By rough bisecting using the Win64 builds, I found that Minetest 5.2.0 is the last version where a full node + 0.5m slab could be climbed. |
(After thinking about this more...) this is a wrong implementation idea. Holding sneak acts like grabbing to the top surface of a node, hence snapping makes sense for upwards movements. If even, it should be the opposite: no snapping when falling down because the body's center of mass is too far away from the edge to have a chance to grab the node. |
Fixes #11261
I did not mark this as trivial because there might (as always) someone depend on this snapping behaviour already when jumping up.
To do
This PR is Ready for Review.
How to test
Stack a few slabs (like below) and rotate them accordingly to make the effect more apparent: