-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove hackish and not multiplayer ready crouch visuals. #2961
Conversation
Issues with old code: - client triggered redundant movement mode changes that would also automatically result from movement input - movementDebugCommands were used to do eye height and height modification - eye height was set via server based on values received by client - character height and eye height change got triggered by client instead of being a result of movement mode change - the player height change triggered a teleportation of the player which messes up further with the movement prediction system
Hooray Jenkins reported success with all tests good! |
1 similar comment
Hooray Jenkins reported success with all tests good! |
I do agree that most of the code was 'hacky' and not ready for multiplayer. However, this change simply destroys the point of "crouching" which is reduction of height. The shift (Run/Walk toggle) button probably would do the exact same thing as crouching now. If you want to remove this for the sake of removing the multiplayer bug or if you plan to initiate a movement refactoring rework soon, I don't mind going ahead with this. Otherwise, it is a step in the opposite direction and simply undoes things. |
I think the main intention of crouching was to have a "do not fall of edge" feature which was not implemented yet anyway. The current code just solves it in the wrong way. Having it there just gives other developers bad examples of how to do stuff. |
I agree the code was problematic in multiplayer, but it did work really well in single player. The crouching for height differences is also desirable imho :-) Could we live with a workaround for multiplayer (disable crouching entirely if needed) along with some big visible TODOs while keeping it functional as-is in single player? Or is that too "code smelly" ? I don't know who might have time to finish this since it isn't part of GSOC which will eat most of our time. Or would it be better to park the code elsewhere entirely and wrap it into the overall movement refactoring whenever we get somebody active on that area? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code smell of the current implementation is quite huge IMHO. Reverting the changes sounds reasonable, as crouching as it is currently mostly just affects the eye height in single player, nothing more.
I've got confused by the up-and-down-flickering in multiplayer, and I think it would be better to (at least) turn it off.
I don't mind reverting all of this and keep notes for a later movement refactoring. The code is not lost as we can simply look at this PR. So, I vote for merging this.
I think crouching actually allows you to pass through 1x1 areas (like if we had vents or small tunnels). It would be useful if we ever wanted to make adventure maps with secrets, traps or w/e else. Completely removing it for now is ok, but the idea is good and we should get back to it when possible. |
Hooray Jenkins reported success with all tests good! |
Could be a really cool issue to work on right after GSOC. Movement refactoring is a bigger topic, so we could try to get students, mentors, and anybody interested work together on this right after the coding period ended, to not loose the focus and drive we just gained. |
Seeing as it's raising bugs like #3108 I think it would be good to merge this and then make it some kind of gsoc task |
Hooray Jenkins reported success with all tests good! |
Fixed the conflict and gave it a short test. I suggest to merge this PR, then close #2555, #2651, #3108 and continue on #1075 (it is the only one with a bounty) with the requests from the named issues. Full list for crouching for me would be:
For the last point it would make sense to clean up the system first (after this PR) which is something i can work on. |
Left it open a bit longer :) |
Thanks for merging |
Contains
This removes the constant camera up/down movement in multiplayer when you crouch.
It also makes it so that while "default croaching" is enabled with key "x", presseing the temporary croach button "ctrl" will make the character temporarly stop crouching. This is analog to how it is for running.
This change removes all the hackish existing player height and eye height modificaitons during crouching. The old code had the following issues:
automatically result from movement input
How to test
Start a headless server and join as client. Then try crouching. Movement speed should be slightly slower while crouching.