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

Death screen shows up on final death, bringing you to spectate location. #25

Closed
mibby opened this issue Mar 31, 2020 · 20 comments
Closed

Comments

@mibby
Copy link

mibby commented Mar 31, 2020

PVPArena dev 316 (https://ci.craftyn.com/view/Spigot%20PVP%20Arena/)
Modules as of dev 198
Paper dev 155 (Spigot 1.15.2)

Arena Config
https://paste.ubuntu.com/p/4MKwG5PCJh/

On your final death that teleports you to the spectate lounge, the death respawn screen appears. Clicking the respawn button doesn't do anything, the screen just goes away and you are still in the spectate lounge.

@Eredrim Would it be possible to not have the death screen appear on last life death to spectate teleport? Normal deaths inside the arena properly do not show the death screen.

@Eredrim
Copy link
Owner

Eredrim commented Mar 31, 2020

Unfortunately this bug seems to be the same as #18. I never found the root cause of that issue despite a lot of time spent. Any help is welcome.

@mibby
Copy link
Author

mibby commented Mar 31, 2020

If I had to guess, teleport to spectate happens before preventDeath checks to cancels the death event? Since players are no longer part of the fighting state when spectating.

i.e.

Player Joins Arena > Game Starts > Part of FIGHTING state / in arena > Player Dies (loses all HP) > lives remaining check > preventDeath cancels death > Respawn > Player Dies > lives remaining check > preventDeath cancels death > Respawn > Player Dies (no more lives) > lives remaining check > teleport to Spectate > death screen (not actually dead but doesn't prevent death since no longer part of arena?)

Or because it teleports out of the arena the same time prevent death happens, it doesn't cancel the screen? I'd have to enable PA debug to find out exactly what's going on.

@Eredrim
Copy link
Owner

Eredrim commented Apr 5, 2020

Hi @mibby !
I have good and bad news. The bad one first : I didn't succeed in reproducing your issue despite many tries. The good one, I fixed the issue #18 and I applied the same correction to teleportation occurring after players lose all the remaining lives.

I suggest you to try the latest dev build and, after some tests, to say me if your problem stills appear.

@mibby
Copy link
Author

mibby commented Apr 13, 2020

Unfortunately this issue still occurs for me @Eredrim.

Here is a zipped copy of the arena config and my arena world for testing. Please edit this comment to remove the download link once you have it.
file downloaded

Just join /pa duel with 2 accounts, die 3 times with one of them, and on the 3rd death, you are brought to the spectate location but have the death screen.


Also is there any way to actually remove the death screen from occurring with packets? To properly prevent death and just teleport for respawn. Currently with dev 317 when you die, the death screen appears for a second, then goes away as you respawn.

@Eredrim
Copy link
Owner

Eredrim commented Apr 13, 2020

Hi mibby,

I think we misunderstand 😄. The objective of dev 317 was to avoid infinite death screen and not to completely remove death screen. Yes, seeing a death screen when you are teleported to spectator zone is ugly but it's only cosmetic and for me priority was to remove blocking stuff.
I will have more time at the end of the month to develop on PvPArena and I will look for improving the arena death system.

@mibby
Copy link
Author

mibby commented Apr 13, 2020

Ah, I see. Would it be possible to have the death screen refresh and tick away like in-arena respawns then when you are brought to spectator? Because as it stands, it remains active on your screen until you make the conscious decision to click it away.

@Eredrim
Copy link
Owner

Eredrim commented Apr 13, 2020

Yeah, I agree, it's boring even if it's just... normal death screen behavior :)
My objective is clearly to hide it in any case in order to be better player friendly

@Eredrim
Copy link
Owner

Eredrim commented Apr 23, 2020

@mibby Hey ! I read your message on my commit and I made a new fix. Please try dev build #319 and say me if all works. I tested it with your duel arena and with my FFA, Team death match and infected maps.

@mibby
Copy link
Author

mibby commented May 4, 2020

@Eredrim Sorry for getting back to you so late. Using dev 319, unfortunately the death screen still occurs on the final death when you are teleported to spectate and old location on arena end. :(

I'm also running into a reported issue that sometimes (rarely) people are respawning in the same location they die in the battlefield. Someone even had it where they respawned where they died at the end of the game as a spectator instead of being brought to the spectate location.

Edit: It might actually be caused by players spam clicking so fast that they actually end up hitting the death screen respawn button before PA tries to teleport the player and hide it with prevent death. When they hit the respawn button, it spawns them back where they died?

So the two issues would be respawning in location of death and the respawn screen not going away when brought to spectate location.

Edit 2: If you would like to see the issue live, you are welcome to hop on over to my server at play.eoscraftmc.com and ask my staff about it. Or play-test CTF / Duel.

@Eredrim
Copy link
Owner

Eredrim commented May 4, 2020

Hi mibby !
Firstly, thank you very much for your feedback, PVPArena is really hard to test and nothing can replace a "real" server experience. So it's really useful for me.
Concerning the death screen when player is teleported in spectating area, that's normal problem was not solved in your build but, great news, I fixed it. It's just on another dev branch.
Regarding people who stay in the arena after their final death, it's more annoying. I will try to spam click in order to reproduce it.

@mibby
Copy link
Author

mibby commented May 9, 2020

Hi @Eredrim, did some more testing as of commit / branch 31dd4a8

  • Death screen did not occur (remain on screen) on any death in any of the duel fights. The death screen properly removed itself after a tick, even on final death being brought to spectate. While it does occur and flash briefly occasionally, it properly goes away this time. :) No more hanging around until users click it away.

  • Spam clicking still results in the occasional respawning where the player dies. This occurred even on the final death -- the player respawned as a spectator where they died as the game counted down to end. Do you think fixing this problem is as simple as forcing player teleportation 2 ticks after handling death? So the death screen tries to hide in 1 tick, then the arena tries to teleport a tick after from their death / current location.

@Eredrim
Copy link
Owner

Eredrim commented May 9, 2020

Hi !

After many tries, I'm not able to reproduce the spam clicking issue. I built a special build of PVPArena 1.14.1-SNAPSHOT with improved logging in order to debug that. You can download this build here. Can you run this build, enable debugging on your arena (/pa debug arenaname), reproduce the issue and then send me the debug log (which is in /plugins/pvparena/debug/arenaName) ?

NB: this is a 1.14.1 build so there isn't the fix for death screen when players is teleported to spectator zone.

@mibby
Copy link
Author

mibby commented May 9, 2020

@Eredrim Here is a /pa debug Duel with the problem reproduced with your above test build. The debug is of 4 games.

Duel - https://paste.ubuntu.com/p/jfDjzwQCpY/

  • Game 1 - ColtNForty5 vs TastyPotatoes. Colt joined and then left because he wasn't suppose to.
  • Game 2 - mibby vs TastyPotatoes. There was no respawn breaking.
  • Game 3 - mibby vs TastyPotatoes. I think there was a break but I don't remember which death it was.
  • Game 4 - mibby vs TastyPotatoes. Death 1 and Death 3 (which should be spectate) broke for Tasty. He managed to respawn where he died. It was just me killing him while he spam clicked.

Here is another debug with /pa debug all and the log with minimal clutter.

Duel - https://paste.ubuntu.com/p/DQb7KzG88p/
General - https://paste.ubuntu.com/p/zWxSWGyNsV/

  • Just 1 game - mibby vs TastyPotatoes. Tasty managed to break death 1 (respawning where he died) and death 3 (respawning where he died as spectator).

For reference, these are the initial spawn locations for the arena tested in.

spawns:
  exit: spawn,9,58,0,-269.92340087890625,13.349924087524414
  lounge: void,-1067,115,1185,270.5985107421875,3.4499664306640625
  spawn1: void,-979,75,1145,270.2951354980469,0.14998096227645874
  spawn2: void,-979,75,1145,269.6952209472656,-0.15002641081809998
  spectator: void,-981,112,1171,201.6031036376953,38.69969177246094
  spawn3: void,-949,75,1145,89.69518280029297,0.1499841809272766
  spawn4: void,-949,75,1145,89.69518280029297,0.1499841809272766
arenaregion:
  battlefield: void,-982,71,1127,-947,88,1162,cuboid,0,4095,BATTLE

@Eredrim
Copy link
Owner

Eredrim commented May 10, 2020

If I understand, players may also respawn where they died even if it's not they final death ?
It's really strange because "intermediate" deaths use the respawn mechanisms which doesn't use delayed teleportation. These are never modified in my last commits. Furthermore, in your logs, all teleportation processes are strictly identical between normal and broken deaths: teleporting tasks are called and point a spawnpoint. Are you sure this problem did not appear with previous versions (dev build #316 or 1.14.0) ?

@mibby
Copy link
Author

mibby commented May 10, 2020

players may also respawn where they died even if it's not they final death ?

Yes, that is correct. By spam clicking and assumed being able to click the respawn screen before PVPArena hides it, they are able to respawn exactly where they died if they have multiple lives. Basically cancelling any teleport events the arena is trying to handle (i.e. respawn in spawn locations or respawn in spectator location).

Are you sure this problem did not appear with previous versions

I do not recall this being a problem prior. However it could also just be something people discovered recently and are only now taking advantage of it. Unless an optimization change / patch in Paper (Spigot Fork) as of the last month or so is affecting ticking, chunk loading, or entity respawning? I'm not too sure. All I do know is the problem can easily be reproduced in my live environment. If delaying teleport an extra tick doesn't solve the problem, maybe there needs to be sanity checks to ensure players are actually teleported or not existing in the same location they died at?

@Eredrim
Copy link
Owner

Eredrim commented May 10, 2020

If delaying teleport an extra tick doesn't solve the problem, maybe there needs to be sanity checks to ensure players are actually teleported or not existing in the same location they died at?

Respawn when players still have lives is not delayed and with all information you give me, I'm pretty sure the problem was present on previous version. Would it be possible for you to test it with PVPArena 1.14.0 or #316 dev build ? If so, we will open a new issue dedicated to this problem.
It will be also interesting to test it with a minimal server configuration (Paper, essentials, multi-world plugin, worldedit and PVPArena only), issue might come from an incompatibility.
Concerning sanity checks, I'm' worried that will be to complex and costly (about performance) to implement this kind of system.

@mibby
Copy link
Author

mibby commented May 10, 2020

Unfortunately this issue is still present in dev 316. Again I can only presume it's breaking teleport when clicking the death screen due to spam clicking too fast.

@Eredrim
Copy link
Owner

Eredrim commented May 10, 2020

Okay, for me it's quite a good news. That means this issue is not a consequence of recent developments. I open a new issue => #36

@Eredrim Eredrim added the in progress Development started, feature/fix not ready fo testing label May 11, 2020
@Eredrim
Copy link
Owner

Eredrim commented May 16, 2020

All development your already tested for this specific issue (not the #36 one) is included in 1.15-SNAPSHOT.

@Eredrim Eredrim added awaiting validation Fix pushed, waiting validation from issue author and removed in progress Development started, feature/fix not ready fo testing labels May 16, 2020
@mibby
Copy link
Author

mibby commented May 21, 2020

Compiled as of commit 568dbe8

This initial ticket issue seems to be fixed. No lingering death screen on final death teleport.

@Eredrim Eredrim removed the awaiting validation Fix pushed, waiting validation from issue author label May 21, 2020
@Eredrim Eredrim closed this as completed May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants