The infamous Death Bug

General support forum. If you require assistance and your problem doesnt fall in any of the other categories, this is the forum for you!

Moderator: Team Members

Forum rules
READ THE FORUM STICKY THREADS BEFORE ASKING FOR HELP!
Most information can be found there, and if not, the posts will help you determine the information required to get assistance from the development team.
Incomplete Help Requests will be locked or deleted.
Post Reply
User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

The infamous Death Bug

Post by Gangrenous » Sun Jan 14, 2018 8:21 am

Okay so this one has been haunting the project for over a year. The run down is dying will cause a bit of a desync between the client and the server. I spent the night looking into what is causing it. This is probably not fully the problem but I am close. After you die the server removes your spawn from the zone, but then relocates you into a different part of the zone. Maybe we should not do it this way. Maybe we should change your entity before actually deleting it. The quick and dirty way is to zone you before the deletion, this does actually work.

Around line 500 in client.cpp

Code: Select all

player->SetX(x);
player->SetY(y);
player->SetZ(z);
player->SetHeading(heading);
If you change this to a full out zone, it fixes it every time. If you do not, try to fight again and see what happens. There is no combat text and your animation goes away, it gets wonky.
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: The infamous Death Bug

Post by Gangrenous » Sun Jan 14, 2018 9:09 am

And to add, the fix is to actually prepend a zone on top of those lines above. That clears everything out before you relocate the player.
Resident Dirty Hippy

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: The infamous Death Bug

Post by tyrbo » Sun Jan 14, 2018 12:13 pm

Going to tinker around with re-writing the revive function based on some of our discussion in Discord last night.
Seems a little off at first glance.

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: The infamous Death Bug

Post by tyrbo » Sun Jan 14, 2018 1:37 pm

Okay, so here's what it was.

Clones, if you had them, were from DestroyGhostCmd not being sent to the reviving client, but being sent to everyone else. Ensuring that packet is sent resolves that issue. This might not be an issue with the source on svn.

However, doing so adds the player to the removed spawns list, resulting in no combat messages or animations or anything being sent for that player. The ClearEverything() function should be called, cleaning up the removed spawn list, but it appears to have been commented out at some point. Ensuring that the removed spawns list is cleared for the player or at least does not contain the player itself will resolve that bug.

edit: Still noticing some weird behavior though. Getting closer at least.

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: The infamous Death Bug

Post by tyrbo » Sun Jan 14, 2018 4:47 pm

It looks like there's probably another conditional that's resulting in skipped code after a revive.
Still having some updates not being sent, digging into it now. Should have it resolved shortly.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest