1
0

Delay EntityChangedWorld players' callback until Entity fully linked to world (#3330)

Otherwise, some API calls just don't seem to happen
.gitignore tweak for test executables
This commit is contained in:
ElNounch
2016-08-22 19:43:43 +02:00
committed by Mattes D
parent 07c5f09ecf
commit e9d1a942d1
4 changed files with 32 additions and 15 deletions

View File

@@ -1827,8 +1827,7 @@ bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn, Vector3d
ParentChunk->GetPosX(), ParentChunk->GetPosZ()
);
ParentChunk->RemoveEntity(this);
a_World->AddPlayer(this);
cRoot::Get()->GetPluginManager()->CallHookEntityChangedWorld(*this, a_OldWorld);
a_World->AddPlayer(this, &a_OldWorld); // New world will appropriate and announce client at his next tick
});
return true;
}