diff options
author | Mattes D <github@xoft.cz> | 2015-06-10 08:00:50 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-06-10 08:00:50 +0200 |
commit | d436a71cbc6654a779c6b38f03f610b5bc7a76c9 (patch) | |
tree | 379b0060fc31101159ae69af4e5b96472043b673 /src/Entities/Player.cpp | |
parent | Update build download links. (diff) | |
parent | Implemented nether portal scanning code. (diff) | |
download | cuberite-d436a71cbc6654a779c6b38f03f610b5bc7a76c9.tar cuberite-d436a71cbc6654a779c6b38f03f610b5bc7a76c9.tar.gz cuberite-d436a71cbc6654a779c6b38f03f610b5bc7a76c9.tar.bz2 cuberite-d436a71cbc6654a779c6b38f03f610b5bc7a76c9.tar.lz cuberite-d436a71cbc6654a779c6b38f03f610b5bc7a76c9.tar.xz cuberite-d436a71cbc6654a779c6b38f03f610b5bc7a76c9.tar.zst cuberite-d436a71cbc6654a779c6b38f03f610b5bc7a76c9.zip |
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r-- | src/Entities/Player.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index e3e3fac4f..0ca560d75 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -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 |