mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-30 02:56:44 +00:00 
			
		
		
		
	Bug #1417: Make sure to reset all position/rotation fields when placing items
This commit is contained in:
		
							parent
							
								
									ad3a78706e
								
							
						
					
					
						commit
						0637cde267
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		|  | @ -1681,6 +1681,13 @@ namespace MWWorld | |||
|         MWWorld::Ptr dropped = | ||||
|             object.getClass().copyToCell(object, *cell, pos); | ||||
| 
 | ||||
|         // Reset some position values that could be uninitialized if this item came from a container
 | ||||
|         LocalRotation& localRotation = dropped.getRefData().getLocalRotation(); | ||||
|         localRotation.rot[0] = 0; | ||||
|         localRotation.rot[1] = 0; | ||||
|         localRotation.rot[2] = 0; | ||||
|         dropped.getCellRef().setPosition(pos); | ||||
| 
 | ||||
|         if (mWorldScene->isCellActive(*cell)) { | ||||
|             if (dropped.getRefData().isEnabled()) { | ||||
|                 mWorldScene->addObjectToScene(dropped); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue