1
0

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.
This commit is contained in:
madmaxoft 2013-08-20 21:13:28 +02:00
parent 61b968601a
commit 654c34705c
2 changed files with 10 additions and 3 deletions

View File

@ -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;
{

View File

@ -340,9 +340,6 @@ void cProtocol132::SendLogin(const cPlayer & a_Player, const cWorld & a_World)
Flush();
SendCompass(a_World);
// Send the initial position (so that confirmation works, FS #245):
SendPlayerMoveLook();
}