mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-22 12:25:23 +02:00
Fix situation around aabbox3d default constructor (#15586)
Co-authored-by: JosiahWI <41302989+JosiahWI@users.noreply.github.com>
This commit is contained in:
@@ -115,9 +115,9 @@ struct NodeBox
|
||||
// NODEBOX_FIXED
|
||||
std::vector<aabb3f> fixed;
|
||||
// NODEBOX_WALLMOUNTED
|
||||
aabb3f wall_top;
|
||||
aabb3f wall_bottom;
|
||||
aabb3f wall_side; // being at the -X side
|
||||
aabb3f wall_top = dummybox;
|
||||
aabb3f wall_bottom = dummybox;
|
||||
aabb3f wall_side = dummybox; // being at the -X side
|
||||
// NODEBOX_CONNECTED
|
||||
// (kept externally to not bloat the structure)
|
||||
std::shared_ptr<NodeBoxConnected> connected;
|
||||
@@ -139,6 +139,10 @@ struct NodeBox
|
||||
void reset();
|
||||
void serialize(std::ostream &os, u16 protocol_version) const;
|
||||
void deSerialize(std::istream &is);
|
||||
|
||||
private:
|
||||
/// @note the actual defaults are in reset(), see nodedef.cpp
|
||||
static constexpr aabb3f dummybox = aabb3f({0, 0, 0});
|
||||
};
|
||||
|
||||
struct MapNode;
|
||||
@@ -810,14 +814,14 @@ private:
|
||||
* The union of all nodes' selection boxes.
|
||||
* Might be larger if big nodes are removed from the manager.
|
||||
*/
|
||||
aabb3f m_selection_box_union;
|
||||
aabb3f m_selection_box_union{{0.0f, 0.0f, 0.0f}};
|
||||
|
||||
/*!
|
||||
* The smallest box in integer node coordinates that
|
||||
* contains all nodes' selection boxes.
|
||||
* Might be larger if big nodes are removed from the manager.
|
||||
*/
|
||||
core::aabbox3d<s16> m_selection_box_int_union;
|
||||
core::aabbox3d<s16> m_selection_box_int_union{{0, 0, 0}};
|
||||
|
||||
/*!
|
||||
* NodeResolver instances to notify once node registration has finished.
|
||||
|
Reference in New Issue
Block a user