summaryrefslogtreecommitdiffstats
path: root/src/BoundingBox.cpp
diff options
context:
space:
mode:
authorLane Kolbly <lane@rscheme.org>2017-07-28 18:59:21 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2017-07-28 18:59:21 +0200
commit5402b214b31af60bc96cd4e47e9211715c3e99f5 (patch)
tree3d8b0fe5cc7a3f8c63e365afa9f118d755780ea2 /src/BoundingBox.cpp
parentTentative fix for player-limit race condition (#3862) (diff)
downloadcuberite-5402b214b31af60bc96cd4e47e9211715c3e99f5.tar
cuberite-5402b214b31af60bc96cd4e47e9211715c3e99f5.tar.gz
cuberite-5402b214b31af60bc96cd4e47e9211715c3e99f5.tar.bz2
cuberite-5402b214b31af60bc96cd4e47e9211715c3e99f5.tar.lz
cuberite-5402b214b31af60bc96cd4e47e9211715c3e99f5.tar.xz
cuberite-5402b214b31af60bc96cd4e47e9211715c3e99f5.tar.zst
cuberite-5402b214b31af60bc96cd4e47e9211715c3e99f5.zip
Diffstat (limited to '')
-rw-r--r--src/BoundingBox.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/BoundingBox.cpp b/src/BoundingBox.cpp
index ecf810fa8..3e32fd3ef 100644
--- a/src/BoundingBox.cpp
+++ b/src/BoundingBox.cpp
@@ -60,6 +60,17 @@ cBoundingBox::cBoundingBox(const cBoundingBox & a_Orig) :
+cBoundingBox & cBoundingBox::operator=(const cBoundingBox & a_Other)
+{
+ m_Min = a_Other.m_Min;
+ m_Max = a_Other.m_Max;
+ return *this;
+}
+
+
+
+
+
void cBoundingBox::Move(double a_OffX, double a_OffY, double a_OffZ)
{
m_Min.x += a_OffX;
@@ -119,10 +130,10 @@ cBoundingBox cBoundingBox::Union(const cBoundingBox & a_Other)
{
return cBoundingBox(
std::min(m_Min.x, a_Other.m_Min.x),
- std::min(m_Min.y, a_Other.m_Min.y),
- std::min(m_Min.z, a_Other.m_Min.z),
std::max(m_Max.x, a_Other.m_Max.x),
+ std::min(m_Min.y, a_Other.m_Min.y),
std::max(m_Max.y, a_Other.m_Max.y),
+ std::min(m_Min.z, a_Other.m_Min.z),
std::max(m_Max.z, a_Other.m_Max.z)
);
}