1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00

remove redundant condition

This commit is contained in:
Miloslav Číž 2017-10-27 20:19:20 +02:00
parent ae14aa0c84
commit 03401bb5df

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);