From f71fb83bfc561e2caba8a084690709ff97a40828 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Sun, 16 Mar 2014 20:56:11 +1100 Subject: [PATCH] Cleaned up more inaccurate comments. --- apps/openmw/mwworld/physicssystem.cpp | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/apps/openmw/mwworld/physicssystem.cpp b/apps/openmw/mwworld/physicssystem.cpp index 5d590a19a..3c0c3ffaa 100644 --- a/apps/openmw/mwworld/physicssystem.cpp +++ b/apps/openmw/mwworld/physicssystem.cpp @@ -116,9 +116,8 @@ namespace MWWorld const ESM::Position &refpos = ptr.getRefData().getPosition(); Ogre::Vector3 position(refpos.pos); + /* Anything to collide with? */ OEngine::Physic::PhysicActor *physicActor = engine->getCharacter(ptr.getRefData().getHandle()); - - // If no need to check for collision simply return the new position. if(!physicActor || !physicActor->getCollisionMode()) { return position + (Ogre::Quaternion(Ogre::Radian(refpos.rot[2]), Ogre::Vector3::NEGATIVE_UNIT_Z) * @@ -126,10 +125,10 @@ namespace MWWorld * movement * time; } - /* Anything to collide with? */ btCollisionObject *colobj = physicActor->getCollisionBody(); Ogre::Vector3 halfExtents = physicActor->getHalfExtents(); position.z += halfExtents.z; + waterlevel -= halfExtents.z * 0.5; /* * A 3/4 submerged example @@ -155,13 +154,7 @@ namespace MWWorld bool isBipedal = ptr.getClass().isBipedal(ptr); bool isNpc = ptr.getClass().isNpc(); - //if(!canWalk && !isBipedal && !isNpc && (position.z >= waterlevel)) - //{ - //std::cout << "Swim Creature \""<