-
Notifications
You must be signed in to change notification settings - Fork 274
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
Reset fake player's delta movement when spawning #1755
base: master
Are you sure you want to change the base?
Conversation
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.
This is good.
Is this the right solution though? Likely should instead fix them keeping the speed when being fully killed. Though this fix also makes sense. |
Well, it's probably the easiest way to fix this... |
I'm not so sure, because spawning fake players is typically done either in creative for testing, or in survival for farms. Though I do agree that another way of solving it would instead be to cancel all momentum when the bot dies, rather than when it's spawned in, in case the actual player spawns in, that way they won't get any residual knockback either. |
Actually yeah it makes sense that when you are spawning a fake player you always want it to stay there, although if it was a real player that had actual movement that spawning them would reset it for when they log back in. Though there's a lot more like that, so I don't think it should be the thing to care about here. |
Wdym by that? |
Can this be merged please? Even if it is not the most correct solution, it should work and is quite simple. |
With this PR, fake player's delta movement (momentum) is reset when the player is spawned. This is done to prevent knockback from the previous death from being applied. This should fix #1058.