summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2021-10-03 18:43:22 +0200
committerGitHub <noreply@github.com>2021-10-03 18:43:22 +0200
commit1e4850a6c5faed2d7906fe9d19ac327efefe7922 (patch)
treed9ddba00b1dade19ce695ea7d38ffe13cac62067 /src/Entities
parentProtocol 1.8: fix duplicated vector component in spawn packet (#5314) (diff)
downloadcuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar.gz
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar.bz2
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar.lz
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar.xz
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.tar.zst
cuberite-1e4850a6c5faed2d7906fe9d19ac327efefe7922.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Entity.cpp4
-rw-r--r--src/Entities/Player.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index e275d03da..bf4b9372c 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -1645,7 +1645,7 @@ bool cEntity::MoveToWorld(cWorld & a_World, Vector3d a_NewPosition, bool a_SetPo
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()));
+ return MoveToWorld(a_World, a_ShouldSendRespawn, Vector3i(a_World.GetSpawnX(), a_World.GetSpawnY(), a_World.GetSpawnZ()));
}
@@ -1661,7 +1661,7 @@ bool cEntity::MoveToWorld(const AString & a_WorldName, bool a_ShouldSendRespawn)
return false;
}
- return MoveToWorld(*World, Vector3d(World->GetSpawnX(), World->GetSpawnY(), World->GetSpawnZ()), false, a_ShouldSendRespawn);
+ return MoveToWorld(*World, Vector3i(World->GetSpawnX(), World->GetSpawnY(), World->GetSpawnZ()), false, a_ShouldSendRespawn);
}
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index b99c0227a..24b9c19af 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -965,7 +965,7 @@ void cPlayer::Respawn(void)
const auto & DefaultWorld = *cRoot::Get()->GetDefaultWorld();
// If not, reset spawn to default and inform:
- SetRespawnPosition(Vector3d(DefaultWorld.GetSpawnX(), DefaultWorld.GetSpawnY(), DefaultWorld.GetSpawnZ()), DefaultWorld);
+ SetRespawnPosition(Vector3i(DefaultWorld.GetSpawnX(), DefaultWorld.GetSpawnY(), DefaultWorld.GetSpawnZ()), DefaultWorld);
SendAboveActionBarMessage("Your home bed was missing or obstructed");
}