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 ++ 1 file changed, 2 insertions(+) (limited to 'source/Entities/Pickup.cpp') 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 -- cgit v1.2.3 From f713780db31e22345a1faf048ab948b1b4e03200 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sun, 10 Nov 2013 22:20:25 +0000 Subject: Bundled fixes [SEE DESC] * Fixed compiler warning in Monster.cpp * Future proofed particle effects * Improved pickups, made less jittery --- source/Entities/Pickup.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/Entities/Pickup.cpp') diff --git a/source/Entities/Pickup.cpp b/source/Entities/Pickup.cpp index 5bd61effc..f8aae9703 100644 --- a/source/Entities/Pickup.cpp +++ b/source/Entities/Pickup.cpp @@ -31,8 +31,9 @@ cPickup::cPickup(double a_PosX, double a_PosY, double a_PosZ, const cItem & a_It , m_bCollected( false ) , m_bIsPlayerCreated( IsPlayerCreated ) { - m_MaxHealth = 5; - m_Health = 5; + SetGravity(-10.5f); + SetMaxHealth(5); + SetHealth(5); SetSpeed(a_SpeedX, a_SpeedY, a_SpeedZ); } -- cgit v1.2.3