1
0

Fixed calling OnPlayerJoined() in the wrong place.

This is the first part of a fix for #187.
This commit is contained in:
madmaxoft 2013-12-15 20:12:40 +01:00
parent 54b5f3b712
commit 4ee4cab2d3

View File

@ -1498,13 +1498,8 @@ void cClientHandle::Tick(float a_Dt)
}
// If the chunk the player's in was just sent, spawn the player:
if (m_HasSentPlayerChunk && (m_State != csPlaying) && !IsDestroying())
if (m_HasSentPlayerChunk && (m_State == csDownloadingWorld))
{
if (!cRoot::Get()->GetPluginManager()->CallHookPlayerJoined(*m_Player))
{
// Broadcast that this player has joined the game! Yay~
m_Player->GetWorld()->BroadcastChat(m_Username + " joined the game!", this);
}
m_Protocol->SendPlayerMoveLook();
m_State = csPlaying;
}