- std::vector<aabb3f> nodeboxes = n.getCollisionBoxes(gamedef->ndef());
- for(std::vector<aabb3f>::iterator
- i = nodeboxes.begin();
- i != nodeboxes.end(); ++i)
- {
- aabb3f box = *i;
- box.MinEdge += v3f(x, y, z)*BS;
- box.MaxEdge += v3f(x, y, z)*BS;
- cboxes.push_back(box);
- is_unloaded.push_back(false);
- is_step_up.push_back(false);
- bouncy_values.push_back(n_bouncy_value);
- node_positions.push_back(p);
- is_object.push_back(false);
+ int neighbors = 0;
+ if (f.drawtype == NDT_NODEBOX &&
+ f.node_box.type == NODEBOX_CONNECTED) {
+ v3s16 p2 = p;
+
+ p2.Y++;
+ getNeighborConnectingFace(p2, nodedef, map, n, 1, &neighbors);
+
+ p2 = p;
+ p2.Y--;
+ getNeighborConnectingFace(p2, nodedef, map, n, 2, &neighbors);
+
+ p2 = p;
+ p2.Z--;
+ getNeighborConnectingFace(p2, nodedef, map, n, 4, &neighbors);
+
+ p2 = p;
+ p2.X--;
+ getNeighborConnectingFace(p2, nodedef, map, n, 8, &neighbors);
+
+ p2 = p;
+ p2.Z++;
+ getNeighborConnectingFace(p2, nodedef, map, n, 16, &neighbors);
+
+ p2 = p;
+ p2.X++;
+ getNeighborConnectingFace(p2, nodedef, map, n, 32, &neighbors);