summaryrefslogtreecommitdiffstats
path: root/src/Entities/ArrowEntity.cpp
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-09-19 16:12:54 +0200
committerpeterbell10 <peterbell10@live.co.uk>2017-09-19 16:12:54 +0200
commit30c8470a524f5d09f157d5c1c59eb72c205d5085 (patch)
tree38547152d6e7f4c3c9c2a5c1165f7d8bda52b8c8 /src/Entities/ArrowEntity.cpp
parentcRoot: Make PollPeriod representation 32 bit (#4030) (diff)
downloadcuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.gz
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.bz2
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.lz
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.xz
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.tar.zst
cuberite-30c8470a524f5d09f157d5c1c59eb72c205d5085.zip
Diffstat (limited to 'src/Entities/ArrowEntity.cpp')
-rw-r--r--src/Entities/ArrowEntity.cpp6
1 files changed, 3 insertions, 3 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;
}
}