summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pickup.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/Pickup.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/Pickup.cpp7
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));