From 71abbb2f56c15634cca8615343d9699d0c50724d Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 10 Nov 2013 20:48:12 +0000 Subject: Bundled fixes [SEE DESC] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed pickups spawning in an incorrect position from a JukeBox * Pickups make a popping sound in Prtcl1.7 * Arrows make a *what sort of sound does an arrow make anyway‽* when hitting a block, and a popping sound when fired * Mobs again have metadata * Fixed Prtcl1.7 not using valid JSON to kick a client * Minecarts and arrows again have metadata --- source/Entities/Pickup.cpp | 2 ++ source/Entities/ProjectileEntity.cpp | 3 +++ 2 files changed, 5 insertions(+) (limited to 'source/Entities') diff --git a/source/Entities/Pickup.cpp b/source/Entities/Pickup.cpp index bc8abd204..5bd61effc 100644 --- a/source/Entities/Pickup.cpp +++ b/source/Entities/Pickup.cpp @@ -145,6 +145,8 @@ bool cPickup::CollectedBy(cPlayer * a_Dest) { m_Item.m_ItemCount -= NumAdded; m_World->BroadcastCollectPickup(*this, *a_Dest); + // Also send the "pop" sound effect with a somewhat random pitch (fast-random using EntityID ;) + m_World->BroadcastSoundEffect("random.pop",(int)GetPosX() * 8, (int)GetPosY() * 8, (int)GetPosZ() * 8, 0.5, (float)(0.75 + ((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/source/Entities/ProjectileEntity.cpp b/source/Entities/ProjectileEntity.cpp index 1d5532718..08f46b3d9 100644 --- a/source/Entities/ProjectileEntity.cpp +++ b/source/Entities/ProjectileEntity.cpp @@ -425,6 +425,9 @@ bool cArrowEntity::CanPickup(const cPlayer & a_Player) const void cArrowEntity::OnHitSolidBlock(const Vector3d & a_HitPos, char a_HitFace) { super::OnHitSolidBlock(a_HitPos, a_HitFace); + + // Broadcast arrow hit sound + m_World->BroadcastSoundEffect("random.bowhit", (int)GetPosX() * 8, (int)GetPosY() * 8, (int)GetPosZ() * 8, 0.5, (float)(0.75 + ((float)((GetUniqueID() * 23) % 32)) / 64)); // Broadcast the position and speed packets before teleporting: BroadcastMovementUpdate(); -- cgit v1.2.3