summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/ArrowEntity.cpp6
-rw-r--r--src/Entities/ExpOrb.cpp2
-rw-r--r--src/Entities/Floater.cpp2
-rw-r--r--src/Entities/LeashKnot.cpp4
-rw-r--r--src/Entities/Pickup.cpp2
-rw-r--r--src/Entities/Player.cpp2
6 files changed, 9 insertions, 9 deletions
diff --git a/src/Entities/ArrowEntity.cpp b/src/Entities/ArrowEntity.cpp
index 2c1a1f005..4d104bd26 100644
--- a/src/Entities/ArrowEntity.cpp
+++ b/src/Entities/ArrowEntity.cpp
@@ -88,7 +88,7 @@ void cArrowEntity::OnHitSolidBlock(Vector3d a_HitPos, eBlockFace a_HitFace)
m_HitBlockPos = Vector3i(X, Y, Z);
// Broadcast arrow hit sound
- m_World->BroadcastSoundEffect("entity.arrow.hit", static_cast<double>(X), static_cast<double>(Y), static_cast<double>(Z), 0.5f, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
+ m_World->BroadcastSoundEffect("entity.arrow.hit", BlockHit, 0.5f, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
if ((m_World->GetBlock(Hit) == E_BLOCK_TNT) && IsOnFire())
{
@@ -129,7 +129,7 @@ void cArrowEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos)
}
// Broadcast successful hit sound
- GetWorld()->BroadcastSoundEffect("entity.arrow.hit_player", GetPosX(), GetPosY(), GetPosZ(), 0.5, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
+ GetWorld()->BroadcastSoundEffect("entity.arrow.hit_player", GetPosition(), 0.5, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
Destroy();
}
@@ -154,7 +154,7 @@ void cArrowEntity::CollectedBy(cPlayer & a_Dest)
}
GetWorld()->BroadcastCollectEntity(*this, a_Dest, 1);
- GetWorld()->BroadcastSoundEffect("entity.item.pickup", GetPosX(), GetPosY(), GetPosZ(), 0.5, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
+ GetWorld()->BroadcastSoundEffect("entity.item.pickup", GetPosition(), 0.5, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
m_bIsCollected = true;
}
}
diff --git a/src/Entities/ExpOrb.cpp b/src/Entities/ExpOrb.cpp
index 2d59206c2..4ae847bf8 100644
--- a/src/Entities/ExpOrb.cpp
+++ b/src/Entities/ExpOrb.cpp
@@ -61,7 +61,7 @@ void cExpOrb::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
LOGD("Player %s picked up an ExpOrb. His reward is %i", a_ClosestPlayer->GetName().c_str(), m_Reward);
a_ClosestPlayer->DeltaExperience(m_Reward);
- m_World->BroadcastSoundEffect("entity.experience_orb.pickup", GetPosX(), GetPosY(), GetPosZ(), 0.5f, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
+ m_World->BroadcastSoundEffect("entity.experience_orb.pickup", GetPosition(), 0.5f, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
Destroy(true);
return;
diff --git a/src/Entities/Floater.cpp b/src/Entities/Floater.cpp
index de5824068..4dc64cf53 100644
--- a/src/Entities/Floater.cpp
+++ b/src/Entities/Floater.cpp
@@ -112,7 +112,7 @@ void cFloater::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
if (m_CountDownTime <= 0)
{
m_BitePos = GetPosition();
- m_World->BroadcastSoundEffect("entity.bobber.splash", GetPosX(), GetPosY(), GetPosZ(), 1, 1);
+ m_World->BroadcastSoundEffect("entity.bobber.splash", GetPosition(), 1, 1);
SetPosY(GetPosY() - 1);
m_CanPickupItem = true;
m_PickupCountDown = 20;
diff --git a/src/Entities/LeashKnot.cpp b/src/Entities/LeashKnot.cpp
index c251f9e9d..971032329 100644
--- a/src/Entities/LeashKnot.cpp
+++ b/src/Entities/LeashKnot.cpp
@@ -84,7 +84,7 @@ void cLeashKnot::TiePlayersLeashedMobs(cPlayer & a_Player, bool a_ShouldBroadcas
void cLeashKnot::KilledBy(TakeDamageInfo & a_TDI)
{
super::KilledBy(a_TDI);
- m_World->BroadcastSoundEffect("entity.leashknot.break", GetPosX(), GetPosY(), GetPosZ(), 1, 1);
+ m_World->BroadcastSoundEffect("entity.leashknot.break", GetPosition(), 1, 1);
Destroy();
return;
}
@@ -131,7 +131,7 @@ void cLeashKnot::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
if (m_TicksToSelfDestroy <= 0)
{
Destroy();
- m_World->BroadcastSoundEffect("entity.leashknot.break", GetPosX(), GetPosY(), GetPosZ(), 1, 1);
+ m_World->BroadcastSoundEffect("entity.leashknot.break", GetPosition(), 1, 1);
}
}
}
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index fcae586f6..26fe58252 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -248,7 +248,7 @@ bool cPickup::CollectedBy(cPlayer & 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("entity.item.pickup", GetPosX(), GetPosY(), GetPosZ(), 0.5, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
+ m_World->BroadcastSoundEffect("entity.item.pickup", GetPosition(), 0.5, (0.75f + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
if (m_Item.m_ItemCount <= 0)
{
// All of the pickup has been collected, schedule the pickup for destroying
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 8ce577b8f..0769499b1 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2330,7 +2330,7 @@ void cPlayer::UseEquippedItem(int a_Amount)
if (GetInventory().DamageEquippedItem(static_cast<Int16>(a_Amount)))
{
- m_World->BroadcastSoundEffect("entity.item.break", GetPosX(), GetPosY(), GetPosZ(), 0.5f, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
+ m_World->BroadcastSoundEffect("entity.item.break", GetPosition(), 0.5f, static_cast<float>(0.75 + (static_cast<float>((GetUniqueID() * 23) % 32)) / 64));
}
}