Merge pull request #1527 from drummyfish/master

Remove redundant condition
This commit is contained in:
scrawl 2017-10-28 15:59:35 +00:00 committed by GitHub
commit 9c9da7b49f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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