From f5c3cba6ffc708a9f204967c3c8118f16b45d47a Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sat, 6 Oct 2012 17:19:56 +0000 Subject: Fixed player respawning crashing the server. ( http://forum.mc-server.org/showthread.php?tid=520&pid=4789#pid4789 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@935 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Protocol/Protocol132.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/Protocol/Protocol132.cpp b/source/Protocol/Protocol132.cpp index f356b611a..d46a16160 100644 --- a/source/Protocol/Protocol132.cpp +++ b/source/Protocol/Protocol132.cpp @@ -522,7 +522,14 @@ int cProtocol132::ParseHandshake(void) int cProtocol132::ParseClientStatuses(void) { HANDLE_PACKET_READ(ReadByte, byte, Status); - m_Client->HandleLogin(39, m_Username); + if ((Status & 1) == 0) + { + m_Client->HandleLogin(39, m_Username); + } + else + { + m_Client->HandleRespawn(); + } return PARSE_OK; } -- cgit v1.2.3