mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-04 00:26:39 +00:00 
			
		
		
		
	Revert "Don't create a CharacterController for objects with no animations"
This reverts commit cce42b6e9d.
			
			
This commit is contained in:
		
							parent
							
								
									03a10f217a
								
							
						
					
					
						commit
						9fa8e88366
					
				
					 3 changed files with 1 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -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…
	
		Reference in a new issue