diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-28 22:35:38 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-08-28 22:35:38 +0200 |
commit | 071aee6c79534ad7181a7dd72db11041268b0de1 (patch) | |
tree | e9f01ccf56e5a242cf70faba99ebebd537bb9ee6 /src/Chunk.cpp | |
parent | Chunk: Make StayCount/AlwaysTicked unsigned (diff) | |
download | cuberite-071aee6c79534ad7181a7dd72db11041268b0de1.tar cuberite-071aee6c79534ad7181a7dd72db11041268b0de1.tar.gz cuberite-071aee6c79534ad7181a7dd72db11041268b0de1.tar.bz2 cuberite-071aee6c79534ad7181a7dd72db11041268b0de1.tar.lz cuberite-071aee6c79534ad7181a7dd72db11041268b0de1.tar.xz cuberite-071aee6c79534ad7181a7dd72db11041268b0de1.tar.zst cuberite-071aee6c79534ad7181a7dd72db11041268b0de1.zip |
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r-- | src/Chunk.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp index ea9862c6a..497205667 100644 --- a/src/Chunk.cpp +++ b/src/Chunk.cpp @@ -1496,42 +1496,6 @@ void cChunk::SetAreaBiome(int a_MinRelX, int a_MaxRelX, int a_MinRelZ, int a_Max -void cChunk::CollectPickupsByPlayer(cPlayer & a_Player) -{ - auto BoundingBox = a_Player.GetBoundingBox(); - BoundingBox.Expand(1, 0.5, 1); - - for (auto & Entity : m_Entities) - { - if ((!Entity->IsPickup()) && (!Entity->IsProjectile())) - { - continue; // Only pickups and projectiles can be picked up - } - - if (BoundingBox.IsInside(Entity->GetPosition())) - { - /* - LOG("Pickup %d being collected by player \"%s\", distance %f", - (*itr)->GetUniqueID(), a_Player->GetName().c_str(), SqrDist - ); - */ - MarkDirty(); - if (Entity->IsPickup()) - { - static_cast<cPickup &>(*Entity).CollectedBy(a_Player); - } - else - { - static_cast<cProjectileEntity &>(*Entity).CollectedBy(a_Player); - } - } - } -} - - - - - bool cChunk::SetSignLines(int a_PosX, int a_PosY, int a_PosZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) { // Also sends update packets to all clients in the chunk |