summaryrefslogtreecommitdiffstats
path: root/src/Entities/Boat.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-05-04 10:10:47 +0200
committerGitHub <noreply@github.com>2020-05-04 10:10:47 +0200
commit07ca09574072b303064eafb2751f8f83c865f083 (patch)
treea863831747b046c143a3e2d09ad1f665501d9a0d /src/Entities/Boat.cpp
parentButtons can now be triggered by arrows. (#4670) (diff)
downloadcuberite-07ca09574072b303064eafb2751f8f83c865f083.tar
cuberite-07ca09574072b303064eafb2751f8f83c865f083.tar.gz
cuberite-07ca09574072b303064eafb2751f8f83c865f083.tar.bz2
cuberite-07ca09574072b303064eafb2751f8f83c865f083.tar.lz
cuberite-07ca09574072b303064eafb2751f8f83c865f083.tar.xz
cuberite-07ca09574072b303064eafb2751f8f83c865f083.tar.zst
cuberite-07ca09574072b303064eafb2751f8f83c865f083.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Boat.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/Entities/Boat.cpp b/src/Entities/Boat.cpp
index 872b7e4d4..317a5e1d5 100644
--- a/src/Entities/Boat.cpp
+++ b/src/Entities/Boat.cpp
@@ -49,19 +49,11 @@ void cBoat::BroadcastMovementUpdate(const cClientHandle * a_Exclude)
}
Vector3i Diff = (GetPosition() * 32.0).Floor() - (m_LastSentPosition * 32.0).Floor();
-
if (Diff.HasNonZeroLength()) // Have we moved?
{
- if ((abs(Diff.x) <= 127) && (abs(Diff.y) <= 127) && (abs(Diff.z) <= 127)) // Limitations of a Byte
- {
- m_World->BroadcastEntityRelMove(*this, Vector3<Int8>(Diff), a_Exclude);
- }
- else
- {
- // Too big a movement, do a teleport
- m_World->BroadcastTeleportEntity(*this, a_Exclude);
- }
+ m_World->BroadcastEntityPosition(*this, a_Exclude);
m_LastSentPosition = GetPosition();
+ m_bDirtyOrientation = false;
}
}