From 347162a82f2cba75c4eb7739d4405ea78de4f0b5 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Tue, 12 Nov 2013 21:43:20 +0000 Subject: Bundled fixes [SEE DESC] * BoundingBox now returns FACE_NONE + Arrows can be picked up * Arrows dug up resume physics simulations * Added sound effects for bows, lava to stone, and arrows * Fixed SoundParticleEffect on <1.7 protocols --- source/Chunk.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source/Chunk.cpp') diff --git a/source/Chunk.cpp b/source/Chunk.cpp index be75eae41..cfdcc783c 100644 --- a/source/Chunk.cpp +++ b/source/Chunk.cpp @@ -1679,9 +1679,9 @@ void cChunk::CollectPickupsByPlayer(cPlayer * a_Player) for (cEntityList::iterator itr = m_Entities.begin(); itr != m_Entities.end(); ++itr) { - if (!(*itr)->IsPickup()) + if ((!(*itr)->IsPickup()) && (!(*itr)->IsProjectile())) { - continue; // Only pickups + continue; // Only pickups and projectiles } float DiffX = (float)((*itr)->GetPosX() - PosX ); float DiffY = (float)((*itr)->GetPosY() - PosY ); @@ -1695,7 +1695,14 @@ void cChunk::CollectPickupsByPlayer(cPlayer * a_Player) ); */ MarkDirty(); - (reinterpret_cast(*itr))->CollectedBy( a_Player ); + if ((*itr)->IsPickup()) + { + (reinterpret_cast(*itr))->CollectedBy(a_Player); + } + else + { + (reinterpret_cast(*itr))->CollectedBy(a_Player); + } } else if (SqrDist < 5 * 5) { -- cgit v1.2.3