diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-01 19:46:59 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-01 19:46:59 +0200 |
commit | 576f89c1d5bdb067c0ca06237440f754d80bd13c (patch) | |
tree | cae685487d49fd420d68c850e87cbdec467e5fca /src/Entities/Entity.cpp | |
parent | Implemented end and nether portals (diff) | |
download | cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar.gz cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar.bz2 cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar.lz cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar.xz cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.tar.zst cuberite-576f89c1d5bdb067c0ca06237440f754d80bd13c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Entity.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index b5c272cf2..de6c628e9 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -1093,6 +1093,12 @@ void cEntity::DetectPortal() File.WriteFile(OverworldName + "/world.ini"); MoveToWorld(OverworldName, cRoot::Get()->CreateAndInitializeWorld(OverworldName)); + + if (IsPlayer()) + { + cPlayer * Player = (cPlayer *)this; + Player->TeleportToCoords(Player->GetLastBedPos().x, Player->GetLastBedPos().y, Player->GetLastBedPos().z); + } break; } case dimOverworld: |