Talk:How to Write a Client: Difference between revisions
imported>Miaou (→Respawning: notchian bug ???) |
imported>Miaou (→Respawning: notchian bug ???) |
(No difference)
| |
Revision as of 08:43, 7 February 2013
Respawning
I have noticed that sending a 0x09 does nothing to make a client respawn. But a 0xCD with payload to 1 does. However, the client may stay invisible from an observer logged on the server... If the observer logs out then logs in, then it can see that the client has respawned.
This is very weird and means that maybe more information needs to be sent to server. (of course, I sent 0x0D regularly while testing all that, and server gave me an 0x0D to spawn (which I respected) and 0x08 Health updates).
--> I (may have) found out what happens : this is (in my sense) a bug from the notchian client : from the dying client, if you stop sending your position packets 0x0D after death and stop all sends except keep-alives, the "dead body" stays visible for a notchian observer. When the dying client respawns, the dead body disappears and never reappears... So the client is invisible from an observer (but blocks are refused in his hitbox by the server, so it seems to exist through the server). If you send 0x0D after being dead (filled up with last position before dying for instance), the body disappears. And if after that you send a 0xCD to respawn, everyhing is ok, the observer can see you.
So if you send 0xCD (respawn) right after dying (without sending 0x0D between time of death and 0xCD), the notchian observer has no time to delete the dead body, and when the observer receives new 0x0D, it thinks it is from a dead body and make it disappear instead of making it respawning.
So the right procedure is given in the article... Thanks for reading.