mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 13:56:38 +00:00 
			
		
		
		
	Fix dropped items ending up inaccessible when standing in objects with no collision (Fixes #1441)
This commit is contained in:
		
							parent
							
								
									2dd54dbcfc
								
							
						
					
					
						commit
						6ba112619a
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		|  | @ -1703,14 +1703,15 @@ namespace MWWorld | |||
| 
 | ||||
|         Ogre::Vector3 orig = | ||||
|             Ogre::Vector3(pos.pos); | ||||
|         orig.z += 20; | ||||
|         Ogre::Vector3 dir = Ogre::Vector3(0, 0, -1); | ||||
| 
 | ||||
|         float len = (pos.pos[2] >= 0) ? pos.pos[2] : -pos.pos[2]; | ||||
|         len += 100.0; | ||||
|         float len = 100.0; | ||||
| 
 | ||||
|         std::pair<bool, Ogre::Vector3> hit = | ||||
|             mPhysics->castRay(orig, dir, len); | ||||
|         pos.pos[2] = hit.second.z; | ||||
|         if (hit.first) | ||||
|             pos.pos[2] = hit.second.z; | ||||
| 
 | ||||
|         // copy the object and set its count
 | ||||
|         int origCount = object.getRefData().getCount(); | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue