summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-12-16 00:28:12 +0100
committerGitHub <noreply@github.com>2016-12-16 00:28:12 +0100
commit71e14ee358e59314498e9b46484eff7e34ae6442 (patch)
tree56ca5369d83504ac063dbc3139f72dc2cdf42610 /src/Entities
parentAPIDump: Load the official undocumented from alternate location. (diff)
parentCompositeChat: Use shorter JSON format. (diff)
downloadcuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.gz
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.bz2
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.lz
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.xz
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.tar.zst
cuberite-71e14ee358e59314498e9b46484eff7e34ae6442.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));