Revert "Don't create a CharacterController for objects with no animations"

This reverts commit cce42b6e9d.
pull/148/head
scrawl 8 years ago
parent 03a10f217a
commit 9fa8e88366

@ -29,8 +29,7 @@ void Objects::addObject(const MWWorld::Ptr& ptr)
removeObject(ptr);
MWRender::Animation *anim = MWBase::Environment::get().getWorld()->getAnimation(ptr);
if (anim && anim->hasAnimSources())
mObjects.insert(std::make_pair(ptr, new CharacterController(ptr, anim)));
if(anim) mObjects.insert(std::make_pair(ptr, new CharacterController(ptr, anim)));
}
void Objects::removeObject(const MWWorld::Ptr& ptr)

@ -565,11 +565,6 @@ namespace MWRender
}
}
bool Animation::hasAnimSources() const
{
return !mAnimSources.empty();
}
void Animation::clearAnimSources()
{
mStates.clear();

@ -341,8 +341,6 @@ public:
Animation(const MWWorld::Ptr &ptr, osg::ref_ptr<osg::Group> parentNode, Resource::ResourceSystem* resourceSystem);
virtual ~Animation();
bool hasAnimSources() const;
MWWorld::ConstPtr getPtr() const;
/// Set active flag on the object skeleton, if one exists.

Loading…
Cancel
Save