mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-26 14:56:39 +00:00 
			
		
		
		
	Fix invisibility effect disappearing after a view mode switch
This commit is contained in:
		
							parent
							
								
									b58a63e14e
								
							
						
					
					
						commit
						a37dee09e2
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		|  | @ -935,8 +935,10 @@ namespace MWRender | |||
| 
 | ||||
|     void Animation::setObjectRoot(const std::string &model, bool forceskeleton, bool baseonly, bool isCreature) | ||||
|     { | ||||
|         osg::ref_ptr<osg::StateSet> previousStateset; | ||||
|         if (mObjectRoot) | ||||
|         { | ||||
|             previousStateset = mObjectRoot->getStateSet(); | ||||
|             mObjectRoot->getParent(0)->removeChild(mObjectRoot); | ||||
|         } | ||||
|         mObjectRoot = NULL; | ||||
|  | @ -961,6 +963,9 @@ namespace MWRender | |||
|             mObjectRoot = newObjectRoot; | ||||
|         } | ||||
| 
 | ||||
|         if (previousStateset) | ||||
|             mObjectRoot->setStateSet(previousStateset); | ||||
| 
 | ||||
|         if (baseonly) | ||||
|         { | ||||
|             RemoveDrawableVisitor removeDrawableVisitor; | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue