mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 19:56:38 +00:00 
			
		
		
		
	Restore fix for Bug #875 (commit 602be9bbe7, was broken by 43757efdc4)
				
					
				
			This commit is contained in:
		
							parent
							
								
									e7b9b6d87a
								
							
						
					
					
						commit
						7331a64e34
					
				
					 1 changed files with 1 additions and 8 deletions
				
			
		|  | @ -227,10 +227,6 @@ namespace MWWorld | |||
|             Ogre::Vector3 inertia(0.0f); | ||||
|             Ogre::Vector3 velocity; | ||||
| 
 | ||||
|             bool canWalk = ptr.getClass().canWalk(ptr); | ||||
|             bool isBipedal = ptr.getClass().isBipedal(ptr); | ||||
|             bool isNpc = ptr.getClass().isNpc(); | ||||
| 
 | ||||
|             if(position.z < waterlevel || isFlying) // under water by 3/4 or can fly
 | ||||
|             { | ||||
|                 // TODO: Shouldn't water have higher drag in calculating velocity?
 | ||||
|  | @ -277,14 +273,11 @@ namespace MWWorld | |||
|                 // NOTE: velocity is either z axis only or x & z axis
 | ||||
|                 Ogre::Vector3 nextpos = newPosition + velocity * remainingTime; | ||||
| 
 | ||||
|                 // If not able to fly, walk or bipedal don't allow to move out of water
 | ||||
|                 // If not able to fly, don't allow to swim up into the air
 | ||||
|                 // TODO: this if condition may not work for large creatures or situations
 | ||||
|                 //        where the creature gets above the waterline for some reason
 | ||||
|                 if(newPosition.z < waterlevel && // started 3/4 under water
 | ||||
|                    !isFlying &&  // can't fly
 | ||||
|                    !canWalk &&   // can't walk
 | ||||
|                    !isBipedal && // not bipedal (assume bipedals can walk)
 | ||||
|                    !isNpc &&     // FIXME: shouldn't really need this
 | ||||
|                    nextpos.z > waterlevel &&     // but about to go above water
 | ||||
|                    newPosition.z <= waterlevel) | ||||
|                 { | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue