mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-25 11:26:37 +00:00 
			
		
		
		
	Special case objects with no refnum
This commit is contained in:
		
							parent
							
								
									5e99a3eda6
								
							
						
					
					
						commit
						138957c49a
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		|  | @ -213,6 +213,15 @@ namespace MWWorld | |||
| 
 | ||||
|         // TODO: ensure that the object actually exists in the cell
 | ||||
| 
 | ||||
|         // Objects with no refnum can't be handled correctly in the merging process that happens
 | ||||
|         // on a save/load, so do a simple copy & delete for these objects.
 | ||||
|         if (!object.getCellRef().getRefNum().hasContentFile()) | ||||
|         { | ||||
|             MWWorld::Ptr copied = object.getClass().copyToCell(object, *cellToMoveTo); | ||||
|             object.getRefData().setCount(0); | ||||
|             return copied; | ||||
|         } | ||||
| 
 | ||||
|         MovedRefTracker::iterator found = mMovedHere.find(object.getBase()); | ||||
|         if (found != mMovedHere.end()) | ||||
|         { | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue