mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-07 13:20:25 +00:00
Revert "Don't create a CharacterController for objects with no animations"
This reverts commit cce42b6e9d09331f9d52367b5324f32ebc18c2ff.
This commit is contained in:
parent
03a10f217a
commit
9fa8e88366
@ -29,8 +29,7 @@ void Objects::addObject(const MWWorld::Ptr& ptr)
|
|||||||
removeObject(ptr);
|
removeObject(ptr);
|
||||||
|
|
||||||
MWRender::Animation *anim = MWBase::Environment::get().getWorld()->getAnimation(ptr);
|
MWRender::Animation *anim = MWBase::Environment::get().getWorld()->getAnimation(ptr);
|
||||||
if (anim && anim->hasAnimSources())
|
if(anim) mObjects.insert(std::make_pair(ptr, new CharacterController(ptr, anim)));
|
||||||
mObjects.insert(std::make_pair(ptr, new CharacterController(ptr, anim)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Objects::removeObject(const MWWorld::Ptr& ptr)
|
void Objects::removeObject(const MWWorld::Ptr& ptr)
|
||||||
|
@ -565,11 +565,6 @@ namespace MWRender
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Animation::hasAnimSources() const
|
|
||||||
{
|
|
||||||
return !mAnimSources.empty();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Animation::clearAnimSources()
|
void Animation::clearAnimSources()
|
||||||
{
|
{
|
||||||
mStates.clear();
|
mStates.clear();
|
||||||
|
@ -341,8 +341,6 @@ public:
|
|||||||
Animation(const MWWorld::Ptr &ptr, osg::ref_ptr<osg::Group> parentNode, Resource::ResourceSystem* resourceSystem);
|
Animation(const MWWorld::Ptr &ptr, osg::ref_ptr<osg::Group> parentNode, Resource::ResourceSystem* resourceSystem);
|
||||||
virtual ~Animation();
|
virtual ~Animation();
|
||||||
|
|
||||||
bool hasAnimSources() const;
|
|
||||||
|
|
||||||
MWWorld::ConstPtr getPtr() const;
|
MWWorld::ConstPtr getPtr() const;
|
||||||
|
|
||||||
/// Set active flag on the object skeleton, if one exists.
|
/// Set active flag on the object skeleton, if one exists.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user