Fixed calling OnPlayerJoined() in the wrong place.

This is the first part of a fix for #187.
master
madmaxoft 2013-12-15 20:12:40 +01:00
parent 54b5f3b712
commit 4ee4cab2d3
1 changed files with 1 additions and 6 deletions

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;
}