mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-11-03 23:56:43 +00:00 
			
		
		
		
	Merge branch 'paging' into 'master'
Unbreak un-paging (#7768) Closes #7768 See merge request OpenMW/openmw!3754
This commit is contained in:
		
						commit
						a6e07dd33a
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -111,11 +111,16 @@ namespace
 | 
				
			||||||
        std::string model = getModel(ptr);
 | 
					        std::string model = getModel(ptr);
 | 
				
			||||||
        const auto rotation = makeDirectNodeRotation(ptr);
 | 
					        const auto rotation = makeDirectNodeRotation(ptr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // Null node meant to distinguish objects that aren't in the scene from paged objects
 | 
				
			||||||
 | 
					        // TODO: find a more clever way to make paging exclusion more reliable?
 | 
				
			||||||
 | 
					        static const osg::ref_ptr<SceneUtil::PositionAttitudeTransform> pagedNode(
 | 
				
			||||||
 | 
					            new SceneUtil::PositionAttitudeTransform);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ESM::RefNum refnum = ptr.getCellRef().getRefNum();
 | 
					        ESM::RefNum refnum = ptr.getCellRef().getRefNum();
 | 
				
			||||||
        if (!refnum.hasContentFile() || !std::binary_search(pagedRefs.begin(), pagedRefs.end(), refnum))
 | 
					        if (!refnum.hasContentFile() || !std::binary_search(pagedRefs.begin(), pagedRefs.end(), refnum))
 | 
				
			||||||
            ptr.getClass().insertObjectRendering(ptr, model, rendering);
 | 
					            ptr.getClass().insertObjectRendering(ptr, model, rendering);
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            ptr.getRefData().setBaseNode(nullptr);
 | 
					            ptr.getRefData().setBaseNode(pagedNode);
 | 
				
			||||||
        setNodeRotation(ptr, rendering, rotation);
 | 
					        setNodeRotation(ptr, rendering, rotation);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (ptr.getClass().useAnim())
 | 
					        if (ptr.getClass().useAnim())
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue