Enable waterCollision after moving the player above water (Fixes #3672)

This commit is contained in:
scrawl 2016-12-17 23:21:33 +01:00
parent 19143f9bc7
commit b5e8c98b40

View file

@ -1349,7 +1349,8 @@ namespace MWPhysics
else if (physicActor->getCollisionMode() && canMoveToWaterSurface(iter->first, waterlevel)) else if (physicActor->getCollisionMode() && canMoveToWaterSurface(iter->first, waterlevel))
{ {
const osg::Vec3f actorPosition = physicActor->getPosition(); const osg::Vec3f actorPosition = physicActor->getPosition();
physicActor->setPosition(osg::Vec3f(actorPosition.x(), actorPosition.y(), waterlevel)); physicActor->setPosition(osg::Vec3f(actorPosition.x(), actorPosition.y(), waterlevel));
waterCollision = true;
} }
} }
physicActor->setCanWaterWalk(waterCollision); physicActor->setCanWaterWalk(waterCollision);