Respawn preserves corpse momentum #4382
Labels
No Label
1. kind/balancing
1. kind/breaking
1. kind/bug
1. kind/construction
1. kind/documentation
1. kind/enhancement
1. kind/griefing
1. kind/invalid
1. kind/meme
1. kind/node limit
1. kind/other
1. kind/protocol
2. prio/controversial
2. prio/critical
2. prio/elevated
2. prio/good first issue
2. prio/interesting
2. prio/low
3. source/art
3. source/client
3. source/engine
3. source/ingame
3. source/integration
3. source/lag
3. source/license
3. source/mod upstream
3. source/unknown
3. source/website
4. step/approved
4. step/at work
4. step/blocked
4. step/discussion
4. step/help wanted
4. step/needs confirmation
4. step/partially fixed
4. step/question
4. step/ready to deploy
4. step/ready to QA test
4. step/want approval
5. result/cannot reproduce
5. result/duplicate
5. result/fixed
5. result/maybe
5. result/wontfix
ugh/petz
ugh/QA main
ugh/QA NOK
ugh/QA OK
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: your-land/bugtracker#4382
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When jumping on the haven trampoline (and dying a lot in the process :) ) I discovered a bug in the respawn. If you die while on the trampoline, a respawn dialog is show, but until you actually click the "respawn" button, you corpse continues jumping on the trampoline. If you click respawn a moment before the corpse would drop to ground (and bounce back into air), you get hurt quite a lot after respawn from "falling". If you click respawn right after bouncing off the trampoline, you spawn with significant upward momentum and jump in the air, hitting the arch above spawn.
So when clicking "respawn", you spawn with the movement momentum your corpse had at the moment of clicking the button.
This can cause troubles also in real-life scenarios - wither or another block-demolishing monster blasts you when you stand on edge of a big cliff, you die and your corpse starts falling off that cliff. You press respawn in middle of the fall, die second time at spawn due to preserved momentum ... and I guess opening death portal will just bring you to your bones at spawn, not the ones in nether. That could be quite annoying :)
As far as I understand, we are unable due to engine restrictions to assign 0 speed right before spawn and right after.
Ok, then I suggest having 3x3 patch from mushroom pores at spawn location (or similar measure) as a safety workaround.
can we set speed and gravity to 0 at death?
Doing
player:add_velocity
inregister_on_respawnplayer
leads to some very strange results...When you are dead and have "Respawn" window open, if you call
player:get_velocity()
it seems to keep the value it had before your death (even if your corpse is not moving). And adding speed behaves strange after death.. I think there's some inconsistency about switching from dead to alive state. Could not figure it out, although even looked at some of the cpp code.What kinda worked is making player invincible for a short time, they still can fly up and die after that, but at least this prevents instant splat when flying down (but this also works kinda inconsistent)... And doing it this way may leave some players with invincible priv in some cases, which is fun :P
we've already got "safe teleport" (hm, i see a race condition in there...), which makes a player immune to the damage from a single fall for up to 4 seconds after they are teleported, perhaps that could be retrofitted to work on respawn as well.