mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Fix connected nodes' selection boxes.
This allows the player to more easily target and punch connected nodeboxes, especially if they have a fixed nodebox that is very small, like technic cabling, or xpanes. Tried it on fences and my xpane conversion, and happy with the result.
This commit is contained in:
@@ -456,10 +456,10 @@ void MapNode::getCollisionBoxes(INodeDefManager *nodemgr, std::vector<aabb3f> *b
|
||||
transformNodeBox(*this, f.collision_box, nodemgr, boxes, neighbors);
|
||||
}
|
||||
|
||||
void MapNode::getSelectionBoxes(INodeDefManager *nodemgr, std::vector<aabb3f> *boxes)
|
||||
void MapNode::getSelectionBoxes(INodeDefManager *nodemgr, std::vector<aabb3f> *boxes, u8 neighbors)
|
||||
{
|
||||
const ContentFeatures &f = nodemgr->get(*this);
|
||||
transformNodeBox(*this, f.selection_box, nodemgr, boxes);
|
||||
transformNodeBox(*this, f.selection_box, nodemgr, boxes, neighbors);
|
||||
}
|
||||
|
||||
u8 MapNode::getMaxLevel(INodeDefManager *nodemgr) const
|
||||
|
Reference in New Issue
Block a user