summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-12-15 20:21:43 +0100
committerMattes D <github@xoft.cz>2016-12-16 00:07:22 +0100
commit0e3b3be7662f03b7487408f70548eaca1188da3d (patch)
tree3751d17812c46e5847684d8f968f24c4a4e268d2 /src/Entities
parentAPIDump: Load the official undocumented from alternate location. (diff)
downloadcuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar.gz
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar.bz2
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar.lz
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar.xz
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.tar.zst
cuberite-0e3b3be7662f03b7487408f70548eaca1188da3d.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/ArrowEntity.cpp2
-rw-r--r--src/Entities/Pickup.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp
index 366592549..532d83b23 100644
--- a/src/Entities/ArrowEntity.cpp
+++ b/src/Entities/ArrowEntity.cpp
@@ -167,7 +167,7 @@ void cArrowEntity::CollectedBy(cPlayer & a_Dest)
}
}
- GetWorld()->BroadcastCollectEntity(*this, a_Dest);
+ GetWorld()->BroadcastCollectEntity(*this, a_Dest, 1);
GetWorld()->BroadcastSoundEffect("random.pop", GetPosX(), GetPosY(), GetPosZ(), 0.5, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
m_bIsCollected = true;
}
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index b1892e4cc..f000e60f3 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -234,7 +234,7 @@ bool cPickup::CollectedBy(cPlayer & a_Dest)
}
m_Item.m_ItemCount -= NumAdded;
- m_World->BroadcastCollectEntity(*this, a_Dest);
+ m_World->BroadcastCollectEntity(*this, a_Dest, NumAdded);
// Also send the "pop" sound effect with a somewhat random pitch (fast-random using EntityID ;)
m_World->BroadcastSoundEffect("random.pop", GetPosX(), GetPosY(), GetPosZ(), 0.5, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));