Health returns 0 on reconnect

Started by Mötley, May 18, 2016, 05:22 PM

Previous topic - Next topic

Mötley

When you save a players health for there next return.
If the player does login, then Reconnect before spawn, then Re logins,
Then spawns the player Dies regardless of what validation check you have,.
Was really hard finding that bug.

If doing something like
if ((player.Health) == 0 ) player.Health = 100;It will fix any other related issues death evades etc on the next join and login but on reconnect issue ^ above impossible to patch for some reason, so I would like to think its bugged....
[mergedate]1463590506[/mergedate]
Solved!

So reconnect bug is true.

Version 1:
Just make sure to set a validation check to not save a player if there not spawned, The Idea makes sense if you are saving positions as you will save the positions at the spawn screen.

Version 2:
Another way is other validation checks to save different stat related items like turning off position saves,health, armour, etc.
If the player has not spawned. I prefer version 2 as some account related issues should not be saved at the spawn screen.

Just means you have a lot of checks to run as well as positions

Stormeus

Quote from: Mötley on May 18, 2016, 05:22 PMSolved!

So reconnect bug is true.

Version 1:
Just make sure to set a validation check to not save a player if there not spawned, The Idea makes sense if you are saving positions as you will save the positions at the spawn screen.

This is the correct resolution. You shouldn't be re-saving player states like position and health when the player isn't even spawned.

Closing as WONTFIX.