summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pickup.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2018-07-24 23:30:49 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2018-07-24 23:30:49 +0200
commitc94d7184ebaf7e8540f717c70c1e03ae62e5a7bd (patch)
tree3a373f8ea6f06dc9b117d2d103bfaee5705040b8 /src/Entities/Pickup.cpp
parentStop cFunctionRef constructor from disabling default copy constructor. (#4173) (diff)
downloadcuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar
cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar.gz
cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar.bz2
cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar.lz
cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar.xz
cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.tar.zst
cuberite-c94d7184ebaf7e8540f717c70c1e03ae62e5a7bd.zip
Diffstat (limited to 'src/Entities/Pickup.cpp')
-rw-r--r--src/Entities/Pickup.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index 629f5d189..4b983588c 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -60,10 +60,8 @@ public:
if (Item.m_ItemCount <= 0)
{
/* Experimental: show animation pickups getting together */
- int DiffX = FloorC(m_Pickup->GetPosX() * 32.0) - FloorC(EntityPos.x * 32.0);
- int DiffY = FloorC(m_Pickup->GetPosY() * 32.0) - FloorC(EntityPos.y * 32.0);
- int DiffZ = FloorC(m_Pickup->GetPosZ() * 32.0) - FloorC(EntityPos.z * 32.0);
- a_Entity.GetWorld()->BroadcastEntityRelMove(a_Entity, static_cast<char>(DiffX), static_cast<char>(DiffY), static_cast<char>(DiffZ));
+ auto Diff = (m_Pickup->GetPosition() * 32.0).Floor() - (EntityPos * 32.0).Floor();
+ a_Entity.GetWorld()->BroadcastEntityRelMove(a_Entity, Vector3<char>(Diff));
/* End of experimental animation */
a_Entity.Destroy();