From 5402b214b31af60bc96cd4e47e9211715c3e99f5 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Fri, 28 Jul 2017 11:59:21 -0500 Subject: Check for intersection between placed blocks and entities. (#3850) * Check for intersection between placed blocks and entities. + Implemented GetPlacementCollisionBox, to permit custom placement collision boxes for blocks. * Factored block-entity placement checking into another function in cPlayer. - Removed vector min/max functions * Use GetWorld to get the world in DoesPlacingBlocksIntersectEntity. + Added block height checks, allow different cEntity subclasses to decide whether they will prevent block placement. --- src/BoundingBox.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/BoundingBox.h') diff --git a/src/BoundingBox.h b/src/BoundingBox.h index 38d567562..3641f4061 100644 --- a/src/BoundingBox.h +++ b/src/BoundingBox.h @@ -30,6 +30,8 @@ public: cBoundingBox(const Vector3d & a_Pos, double a_CubeLength); cBoundingBox(const cBoundingBox & a_Orig); + cBoundingBox & operator=(const cBoundingBox & a_Other); + /** Moves the entire boundingbox by the specified offset */ void Move(double a_OffX, double a_OffY, double a_OffZ); -- cgit v1.2.3