mirror of
https://github.com/minetest/minetest.git
synced 2025-09-18 03:15:20 +02:00
Fix missing bounding box for CAO 'wielditem' visual
This commit is contained in:
@@ -244,6 +244,7 @@ void WieldMeshSceneNode::setCube(const ContentFeatures &f,
|
|||||||
scene::SMesh *copy = cloneMesh(cubemesh);
|
scene::SMesh *copy = cloneMesh(cubemesh);
|
||||||
cubemesh->drop();
|
cubemesh->drop();
|
||||||
postProcessNodeMesh(copy, f, false, &m_material_type, &m_colors, true);
|
postProcessNodeMesh(copy, f, false, &m_material_type, &m_colors, true);
|
||||||
|
copy->recalculateBoundingBox();
|
||||||
changeToMesh(copy);
|
changeToMesh(copy);
|
||||||
copy->drop();
|
copy->drop();
|
||||||
m_meshnode->setScale(wield_scale * WIELD_SCALE_FACTOR);
|
m_meshnode->setScale(wield_scale * WIELD_SCALE_FACTOR);
|
||||||
@@ -279,6 +280,7 @@ void WieldMeshSceneNode::setExtruded(const std::string &imagename,
|
|||||||
mesh->addMeshBuffer(copy);
|
mesh->addMeshBuffer(copy);
|
||||||
copy->drop();
|
copy->drop();
|
||||||
}
|
}
|
||||||
|
mesh->recalculateBoundingBox();
|
||||||
changeToMesh(mesh);
|
changeToMesh(mesh);
|
||||||
mesh->drop();
|
mesh->drop();
|
||||||
|
|
||||||
@@ -355,6 +357,7 @@ static scene::SMesh *createSpecialNodeMesh(Client *client, MapNode n,
|
|||||||
colors->emplace_back(p.layer.has_color, p.layer.color);
|
colors->emplace_back(p.layer.has_color, p.layer.color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mesh->recalculateBoundingBox();
|
||||||
return mesh;
|
return mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user