From 654c34705c1745f2bf5eb6b6266b8cd0df05caea Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 20 Aug 2013 21:13:28 +0200 Subject: Fixed player spawning. Now the player is spawned only after the chunk they're in is sent to the client. Hopefully no more falling-through-terrain-while-loggin-in. --- source/ClientHandle.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/ClientHandle.cpp') diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp index 57830f63c..319640eea 100644 --- a/source/ClientHandle.cpp +++ b/source/ClientHandle.cpp @@ -1522,6 +1522,16 @@ void cClientHandle::SendChat(const AString & a_Message) void cClientHandle::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) { + ASSERT(m_Player != NULL); + + if ((m_State == csAuthenticated) || (m_State == csDownloadingWorld)) + { + if ((a_ChunkX == m_Player->GetChunkX()) && (a_ChunkZ == m_Player->GetChunkZ())) + { + m_Protocol->SendPlayerMoveLook(); + } + } + // Check chunks being sent, erase them from m_ChunksToSend: bool Found = false; { -- cgit v1.2.3