Merge pull request #328 from OpenMW/master

Add OpenMW commits up to 31 Oct 2017
pull/329/head
David Cernat 7 years ago committed by GitHub
commit a31d43965f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -768,7 +768,7 @@ namespace MWGui
} }
} }
if (!found) if (!found || selected == cycled)
return; return;
useItem(model.getItem(cycled).mBase); useItem(model.getItem(cycled).mBase);

@ -357,10 +357,9 @@ namespace MWPhysics
osg::Vec3f nextpos = newPosition + velocity * remainingTime; osg::Vec3f nextpos = newPosition + velocity * remainingTime;
// If not able to fly, don't allow to swim up into the air // If not able to fly, don't allow to swim up into the air
if(newPosition.z() < swimlevel && if(!isFlying && // can't fly
!isFlying && // can't fly
nextpos.z() > swimlevel && // but about to go above water nextpos.z() > swimlevel && // but about to go above water
newPosition.z() <= swimlevel) newPosition.z() < swimlevel)
{ {
const osg::Vec3f down(0,0,-1); const osg::Vec3f down(0,0,-1);
velocity = slide(velocity, down); velocity = slide(velocity, down);

Loading…
Cancel
Save