diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-05-04 10:10:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 10:10:47 +0200 |
commit | 07ca09574072b303064eafb2751f8f83c865f083 (patch) | |
tree | a863831747b046c143a3e2d09ad1f665501d9a0d /src/Entities/Pickup.cpp | |
parent | Buttons can now be triggered by arrows. (#4670) (diff) | |
download | cuberite-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 'src/Entities/Pickup.cpp')
-rw-r--r-- | src/Entities/Pickup.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp index 785d29ce9..1faeadaa7 100644 --- a/src/Entities/Pickup.cpp +++ b/src/Entities/Pickup.cpp @@ -59,10 +59,7 @@ public: if (Item.m_ItemCount <= 0) { - /* Experimental: show animation pickups getting together */ - 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.GetWorld()->BroadcastCollectEntity(a_Entity, *m_Pickup, static_cast<unsigned>(CombineCount)); a_Entity.Destroy(); // Reset the timer @@ -253,7 +250,7 @@ bool cPickup::CollectedBy(cPlayer & a_Dest) } m_Item.m_ItemCount -= NumAdded; - m_World->BroadcastCollectEntity(*this, a_Dest, NumAdded); + m_World->BroadcastCollectEntity(*this, a_Dest, static_cast<unsigned>(NumAdded)); // Also send the "pop" sound effect with a somewhat random pitch (fast-random using EntityID ;) m_World->BroadcastSoundEffect("entity.item.pickup", GetPosition(), 0.3f, (1.2f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64)); |