1
0

Fixed cClientHandle::Tick() being called from two threads.

When the player was initialized, the Tick() function continued to stream chunk, while the cWorld called Tick() from its tick thread.
Final fix for #187.
This commit is contained in:
madmaxoft
2013-12-16 10:41:35 +01:00
parent e024278b02
commit f521cbeb31
5 changed files with 48 additions and 31 deletions

View File

@@ -137,28 +137,6 @@ cPlayer::~cPlayer(void)
bool cPlayer::Initialize(cWorld * a_World)
{
ASSERT(a_World != NULL);
if (super::Initialize(a_World))
{
// Remove the client handle from the server, it will be ticked from this object from now on
if (m_ClientHandle != NULL)
{
cRoot::Get()->GetServer()->ClientMovedToWorld(m_ClientHandle);
}
GetWorld()->AddPlayer(this);
return true;
}
return false;
}
void cPlayer::Destroyed()
{
CloseWindow(false);