summaryrefslogtreecommitdiffstats
path: root/src/Chunk.cpp
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2020-05-03 22:04:33 +0200
committerGitHub <noreply@github.com>2020-05-03 22:04:33 +0200
commit994036a3b8b09f8da1b6ec2055cc7a5ceb05a776 (patch)
tree54de33e0f563209cdabc40067b72328ec3126be8 /src/Chunk.cpp
parentUpdate src/Simulator/IncrementalRedstoneSimulator/RedstoneWireHandler.h (diff)
downloadcuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar.gz
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar.bz2
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar.lz
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar.xz
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.tar.zst
cuberite-994036a3b8b09f8da1b6ec2055cc7a5ceb05a776.zip
Diffstat (limited to 'src/Chunk.cpp')
-rw-r--r--src/Chunk.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Chunk.cpp b/src/Chunk.cpp
index 66c8cf4c3..7bb496a5c 100644
--- a/src/Chunk.cpp
+++ b/src/Chunk.cpp
@@ -1625,7 +1625,7 @@ void cChunk::SetAreaBiome(int a_MinRelX, int a_MaxRelX, int a_MinRelZ, int a_Max
void cChunk::CollectPickupsByPlayer(cPlayer & a_Player)
{
- auto BoundingBox = cBoundingBox(a_Player.GetPosition(), a_Player.GetWidth(), a_Player.GetHeight());
+ auto BoundingBox = a_Player.GetBoundingBox();
BoundingBox.Expand(1, 0.5, 1);
for (auto & Entity : m_Entities)
@@ -1876,8 +1876,7 @@ bool cChunk::ForEachEntityInBox(const cBoundingBox & a_Box, cEntityCallback a_Ca
{
continue;
}
- cBoundingBox EntBox(Entity->GetPosition(), Entity->GetWidth() / 2, Entity->GetHeight());
- if (!EntBox.DoesIntersect(a_Box))
+ if (!Entity->GetBoundingBox().DoesIntersect(a_Box))
{
// The entity is not in the specified box
continue;