mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 23:09:44 +00:00
Merge pull request #1527 from drummyfish/master
Remove redundant condition
This commit is contained in:
commit
9c9da7b49f
1 changed files with 2 additions and 3 deletions
|
@ -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…
Reference in a new issue