Fixed deadlock when moving players to other worlds.
Fixes #1039, fixes #851
This commit is contained in:
@@ -129,9 +129,9 @@ const char * cEntity::GetParentClass(void) const
|
||||
|
||||
|
||||
|
||||
bool cEntity::Initialize(cWorld * a_World)
|
||||
bool cEntity::Initialize(cWorld & a_World)
|
||||
{
|
||||
if (cPluginManager::Get()->CallHookSpawningEntity(*a_World, *this))
|
||||
if (cPluginManager::Get()->CallHookSpawningEntity(a_World, *this))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -144,13 +144,13 @@ bool cEntity::Initialize(cWorld * a_World)
|
||||
*/
|
||||
|
||||
m_IsInitialized = true;
|
||||
m_World = a_World;
|
||||
m_World = &a_World;
|
||||
m_World->AddEntity(this);
|
||||
|
||||
cPluginManager::Get()->CallHookSpawnedEntity(*a_World, *this);
|
||||
cPluginManager::Get()->CallHookSpawnedEntity(a_World, *this);
|
||||
|
||||
// Spawn the entity on the clients:
|
||||
a_World->BroadcastSpawnEntity(*this);
|
||||
a_World.BroadcastSpawnEntity(*this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user