diff options
author | Pablo Beltrán <spekdrum@gmail.com> | 2017-08-21 10:46:41 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-08-21 10:46:41 +0200 |
commit | b18f6637b6c58db20353cd3e77584b646ab36b5c (patch) | |
tree | 77b1dcf42aec23ef4aa64a04c906282c5f61ba19 /src/BoundingBox.cpp | |
parent | Changed MoveToWorld to ScheduleMoveToWorld in cPlayer::Respawn (#3922) (diff) | |
download | cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar.gz cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar.bz2 cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar.lz cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar.xz cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.tar.zst cuberite-b18f6637b6c58db20353cd3e77584b646ab36b5c.zip |
Diffstat (limited to 'src/BoundingBox.cpp')
-rw-r--r-- | src/BoundingBox.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/BoundingBox.cpp b/src/BoundingBox.cpp index afb7e025b..bc4926011 100644 --- a/src/BoundingBox.cpp +++ b/src/BoundingBox.cpp @@ -39,6 +39,16 @@ cBoundingBox::cBoundingBox(Vector3d a_Pos, double a_Radius, double a_Height) : +cBoundingBox::cBoundingBox(Vector3d a_Pos, double a_Radius, double a_Height, double a_VerticalOffset) : + m_Min(a_Pos.x - a_Radius, a_Pos.y + a_VerticalOffset, a_Pos.z - a_Radius), + m_Max(a_Pos.x + a_Radius, a_Pos.y + a_VerticalOffset + a_Height, a_Pos.z + a_Radius) +{ +} + + + + + cBoundingBox::cBoundingBox(Vector3d a_Pos, double a_CubeLength) : m_Min(a_Pos.x - a_CubeLength / 2, a_Pos.y - a_CubeLength / 2, a_Pos.z - a_CubeLength / 2), m_Max(a_Pos.x + a_CubeLength / 2, a_Pos.y + a_CubeLength / 2, a_Pos.z + a_CubeLength / 2) |