From 30c8470a524f5d09f157d5c1c59eb72c205d5085 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Tue, 19 Sep 2017 09:12:54 -0500 Subject: Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors (#3959) * Made BroadcastSoundEffect take vector parameters. * Added docs for new vectored methods * Removed old code * Fixed lua warnings * Made old BroadcastSoundEffect not an override. * m_Block to m_BlockPos, used Vector3d constructor where prettier. * a_Block to a_BlockPos * Changed thunderbolt a_Block to a_BlockPos --- src/Entities/ArrowEntity.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Entities/ArrowEntity.cpp') 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(X), static_cast(Y), static_cast(Z), 0.5f, static_cast(0.75 + (static_cast((GetUniqueID() * 23) % 32)) / 64)); + m_World->BroadcastSoundEffect("entity.arrow.hit", BlockHit, 0.5f, static_cast(0.75 + (static_cast((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(0.75 + (static_cast((GetUniqueID() * 23) % 32)) / 64)); + GetWorld()->BroadcastSoundEffect("entity.arrow.hit_player", GetPosition(), 0.5, static_cast(0.75 + (static_cast((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(0.75 + (static_cast((GetUniqueID() * 23) % 32)) / 64)); + GetWorld()->BroadcastSoundEffect("entity.item.pickup", GetPosition(), 0.5, static_cast(0.75 + (static_cast((GetUniqueID() * 23) % 32)) / 64)); m_bIsCollected = true; } } -- cgit v1.2.3