summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-01 19:46:59 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-06-01 19:46:59 +0200
commit576f89c1d5bdb067c0ca06237440f754d80bd13c (patch)
treecae685487d49fd420d68c850e87cbdec467e5fca /src/Entities/Entity.cpp
parentImplemented end and nether portals (diff)
downloadcuberite-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.cpp6
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: