mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix missing bounding box for CAO 'wielditem' visual
This commit is contained in:
parent
4774e65ed9
commit
06f39e1915
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue