1
0

Implemented nether portal scanning code.

This commit is contained in:
Lane Kolbly
2015-05-26 20:35:28 -05:00
parent 87a8df7cde
commit 73b6a44d5f
9 changed files with 432 additions and 20 deletions

View File

@@ -1620,10 +1620,7 @@ void cPlayer::TossItems(const cItems & a_Items)
}
bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn)
bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn, Vector3d a_NewPosition)
{
ASSERT(a_World != nullptr);
@@ -1653,6 +1650,8 @@ bool cPlayer::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn)
SetWorldTravellingFrom(GetWorld()); // cChunk handles entity removal
GetWorld()->RemovePlayer(this, false);
SetPosition(a_NewPosition);
// Queue adding player to the new world, including all the necessary adjustments to the object
a_World->AddPlayer(this);
cWorld * OldWorld = cRoot::Get()->GetWorld(GetWorld()->GetName()); // Required for the hook HOOK_ENTITY_CHANGED_WORLD