diff options
author | madmaxoft <github@xoft.cz> | 2013-11-13 11:08:51 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-11-13 11:08:51 +0100 |
commit | 293051eca89351181f11443e1785617ab58459c8 (patch) | |
tree | 50c637b3c2ac3f1848610623156ce96be1b91be5 /source/Chunk.cpp | |
parent | cWindow: Fixed item dupe glitch with painting (#278) (diff) | |
parent | Bundled fixes [SEE DESC] (diff) | |
download | cuberite-293051eca89351181f11443e1785617ab58459c8.tar cuberite-293051eca89351181f11443e1785617ab58459c8.tar.gz cuberite-293051eca89351181f11443e1785617ab58459c8.tar.bz2 cuberite-293051eca89351181f11443e1785617ab58459c8.tar.lz cuberite-293051eca89351181f11443e1785617ab58459c8.tar.xz cuberite-293051eca89351181f11443e1785617ab58459c8.tar.zst cuberite-293051eca89351181f11443e1785617ab58459c8.zip |
Diffstat (limited to 'source/Chunk.cpp')
-rw-r--r-- | source/Chunk.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
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<cPickup *>(*itr))->CollectedBy( a_Player ); + if ((*itr)->IsPickup()) + { + (reinterpret_cast<cPickup *>(*itr))->CollectedBy(a_Player); + } + else + { + (reinterpret_cast<cProjectileEntity *>(*itr))->CollectedBy(a_Player); + } } else if (SqrDist < 5 * 5) { |