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:
parent
61b968601a
commit
654c34705c
@ -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;
|
||||
{
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user