diff --git a/apps/openmw/mwworld/physicssystem.cpp b/apps/openmw/mwworld/physicssystem.cpp index 7f26fa75a..c4b904ca9 100644 --- a/apps/openmw/mwworld/physicssystem.cpp +++ b/apps/openmw/mwworld/physicssystem.cpp @@ -45,7 +45,12 @@ void animateCollisionShapes (std::mapsearchPtrViaHandle(it->first->mName); + if (ptr.isEmpty()) // Shouldn't happen + throw std::runtime_error("can't find Ptr"); + MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(ptr); + if (!animation) // Shouldn't happen either, since keyframe-controlled objects are not batched in StaticGeometry + throw std::runtime_error("can't find Animation for " + ptr.getCellRef().getRefId()); OEngine::Physic::AnimatedShapeInstance& instance = it->second; diff --git a/components/nifbullet/bulletnifloader.cpp b/components/nifbullet/bulletnifloader.cpp index 64febc3c2..7f78c04aa 100644 --- a/components/nifbullet/bulletnifloader.cpp +++ b/components/nifbullet/bulletnifloader.cpp @@ -181,7 +181,8 @@ void ManualBulletShapeLoader::handleNode(const Nif::Node *node, int flags, // the flags we currently use, at least. flags |= node->flags; - if (!node->controller.empty() && node->controller->recType == Nif::RC_NiKeyframeController) + if (!node->controller.empty() && node->controller->recType == Nif::RC_NiKeyframeController + && (node->controller->flags & Nif::NiNode::ControllerFlag_Active)) isAnimated = true; if (!raycasting)