diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-03-30 10:38:45 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-03-30 10:42:06 +0200 |
commit | 9e796f4e624c575b74518f9b29bd57f193c87336 (patch) | |
tree | 5e43853a75044a7acad1ef48bf51b3d86c2a1d72 /src/Entities/Entity.cpp | |
parent | Merge pull request #3091 from LogicParrot/bed (diff) | |
download | cuberite-9e796f4e624c575b74518f9b29bd57f193c87336.tar cuberite-9e796f4e624c575b74518f9b29bd57f193c87336.tar.gz cuberite-9e796f4e624c575b74518f9b29bd57f193c87336.tar.bz2 cuberite-9e796f4e624c575b74518f9b29bd57f193c87336.tar.lz cuberite-9e796f4e624c575b74518f9b29bd57f193c87336.tar.xz cuberite-9e796f4e624c575b74518f9b29bd57f193c87336.tar.zst cuberite-9e796f4e624c575b74518f9b29bd57f193c87336.zip |
Diffstat (limited to 'src/Entities/Entity.cpp')
-rw-r--r-- | src/Entities/Entity.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp index 169bcb4de..5dcef330a 100644 --- a/src/Entities/Entity.cpp +++ b/src/Entities/Entity.cpp @@ -1584,6 +1584,24 @@ bool cEntity::DoMoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn, Vector3d +bool cEntity::MoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn, Vector3d a_NewPosition) +{ + return DoMoveToWorld(a_World, a_ShouldSendRespawn, a_NewPosition); +} + + + + + +bool cEntity::MoveToWorld(cWorld * a_World, bool a_ShouldSendRespawn) +{ + return MoveToWorld(a_World, a_ShouldSendRespawn, Vector3d(a_World->GetSpawnX(), a_World->GetSpawnY(), a_World->GetSpawnZ())); +} + + + + + bool cEntity::MoveToWorld(const AString & a_WorldName, bool a_ShouldSendRespawn) { cWorld * World = cRoot::Get()->GetWorld(a_WorldName); @@ -1593,7 +1611,7 @@ bool cEntity::MoveToWorld(const AString & a_WorldName, bool a_ShouldSendRespawn) return false; } - return DoMoveToWorld(World, a_ShouldSendRespawn, GetPosition()); + return DoMoveToWorld(World, a_ShouldSendRespawn, Vector3d(World->GetSpawnX(), World->GetSpawnY(), World->GetSpawnZ())); } |