mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-22 10:39:41 +00:00
Merge pull request #1971 from akortunov/meshfallback
Try to use collisions from basic actor model if an animated one has no collisions
This commit is contained in:
commit
e99edfd954
2 changed files with 11 additions and 0 deletions
|
@ -175,6 +175,7 @@
|
||||||
Feature #4632: AI priority: utilize vanilla AI GMSTs for priority rating
|
Feature #4632: AI priority: utilize vanilla AI GMSTs for priority rating
|
||||||
Feature #4636: Use sTo GMST in spellmaking menu
|
Feature #4636: Use sTo GMST in spellmaking menu
|
||||||
Feature #4642: Batching potion creation
|
Feature #4642: Batching potion creation
|
||||||
|
Feature #4682: Use the collision box from basic creature mesh if the X one have no collisions
|
||||||
Task #2490: Don't open command prompt window on Release-mode builds automatically
|
Task #2490: Don't open command prompt window on Release-mode builds automatically
|
||||||
Task #4545: Enable is_pod string test
|
Task #4545: Enable is_pod string test
|
||||||
Task #4605: Optimize skinning
|
Task #4605: Optimize skinning
|
||||||
|
|
|
@ -1337,6 +1337,16 @@ namespace MWPhysics
|
||||||
if (!shape)
|
if (!shape)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Try to get shape from basic model as fallback for creatures
|
||||||
|
if (!ptr.getClass().isNpc() && shape->mCollisionBoxHalfExtents.length2() == 0)
|
||||||
|
{
|
||||||
|
const std::string fallbackModel = ptr.getClass().getModel(ptr);
|
||||||
|
if (fallbackModel != mesh)
|
||||||
|
{
|
||||||
|
shape = mShapeManager->getShape(fallbackModel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Actor* actor = new Actor(ptr, shape, mCollisionWorld);
|
Actor* actor = new Actor(ptr, shape, mCollisionWorld);
|
||||||
mActors.insert(std::make_pair(ptr, actor));
|
mActors.insert(std::make_pair(ptr, actor));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue