mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-24 18:41:34 +00:00
Closes #1107: Do not create box shapes unless the box collision flag is enabled
This commit is contained in:
parent
3ea1407ed3
commit
79a6ffd216
1 changed files with 6 additions and 3 deletions
|
@ -229,9 +229,12 @@ void ManualBulletShapeLoader::handleNode(btTriangleMesh* mesh, const Nif::Node *
|
||||||
{
|
{
|
||||||
if(node->hasBounds)
|
if(node->hasBounds)
|
||||||
{
|
{
|
||||||
mShape->mBoxTranslation = node->boundPos;
|
if (node->flags & Nif::NiNode::Flag_BBoxCollision)
|
||||||
mShape->mBoxRotation = node->boundRot;
|
{
|
||||||
mBoundingBox = new btBoxShape(getbtVector(node->boundXYZ));
|
mShape->mBoxTranslation = node->boundPos;
|
||||||
|
mShape->mBoxRotation = node->boundRot;
|
||||||
|
mBoundingBox = new btBoxShape(getbtVector(node->boundXYZ));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(node->recType == Nif::RC_NiTriShape)
|
else if(node->recType == Nif::RC_NiTriShape)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue