From 12511778d1d262365205b0c532c2d62e670a6ba2 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Wed, 12 Nov 2014 22:43:22 +1100 Subject: [PATCH] Remove duplicate parameter. --- apps/opencs/view/render/mousestate.cpp | 2 +- apps/opencs/view/world/physicssystem.cpp | 9 ++++----- apps/opencs/view/world/physicssystem.hpp | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/opencs/view/render/mousestate.cpp b/apps/opencs/view/render/mousestate.cpp index e62a4b1ff8..41908d11c3 100644 --- a/apps/opencs/view/render/mousestate.cpp +++ b/apps/opencs/view/render/mousestate.cpp @@ -244,7 +244,7 @@ namespace CSVRender !QString(result.first.c_str()).contains(QRegExp("^Pathgrid"))) { pos.z -= result.second; - pos.z += 2; // arbitrary number, lift up slightly (maybe change the nif?) + pos.z += 1; // arbitrary number, lift up slightly (maybe change the nif?) // FIXME: rather than just updating at the end, should // consider providing visual feedback of terrain height // while dragging the pathgrid point (maybe check whether diff --git a/apps/opencs/view/world/physicssystem.cpp b/apps/opencs/view/world/physicssystem.cpp index 6450b5cf6c..c5f1d0a75e 100644 --- a/apps/opencs/view/world/physicssystem.cpp +++ b/apps/opencs/view/world/physicssystem.cpp @@ -267,7 +267,7 @@ namespace CSVWorld } std::pair PhysicsSystem::distToGround(const Ogre::Vector3 &position, - Ogre::uint32 visibilityMask, const float limit, bool ignorePgPoint) + Ogre::uint32 visibilityMask, const float limit) { btVector3 _from, _to; _from = btVector3(position.x, position.y, position.z); @@ -275,8 +275,7 @@ namespace CSVWorld bool ignoreHeightMap = !(visibilityMask & (Ogre::uint32)CSVRender::Element_Terrain); bool ignoreObjects = !(visibilityMask & (Ogre::uint32)CSVRender::Element_Reference); - bool ignorePathgrid = ignorePgPoint || - !(visibilityMask & (Ogre::uint32)CSVRender::Element_Pathgrid); + bool ignorePathgrid = !(visibilityMask & (Ogre::uint32)CSVRender::Element_Pathgrid); std::pair result = std::make_pair("", -1); short mask = OEngine::Physic::CollisionType_Raycasting; @@ -303,7 +302,7 @@ namespace CSVWorld return std::make_pair(result.first, limit*result.second); } - // tries to find the distance to the "top" of the closest object + // tries to find the distance to the "top" of the closest object (ignores pathgrid points) std::pair PhysicsSystem::distToClosest(const Ogre::Vector3 &position, Ogre::uint32 visibilityMask, const float limit) { @@ -311,7 +310,7 @@ namespace CSVWorld std::pair resDown = distToGround(Ogre::Vector3(position.x, position.y, position.z+thickness), - visibilityMask, limit+thickness, true); + visibilityMask&(~CSVRender::Element_Pathgrid), limit+thickness); if(resDown.first != "") return std::make_pair(resDown.first, resDown.second-thickness); diff --git a/apps/opencs/view/world/physicssystem.hpp b/apps/opencs/view/world/physicssystem.hpp index f71ab685c7..839d556543 100644 --- a/apps/opencs/view/world/physicssystem.hpp +++ b/apps/opencs/view/world/physicssystem.hpp @@ -76,7 +76,7 @@ namespace CSVWorld float mouseY, Ogre::SceneManager *sceneMgr, Ogre::Camera *camera); std::pair distToGround(const Ogre::Vector3 &position, - Ogre::uint32 visibilityMask, const float limit = 300000, bool ignorePgPoint = false); + Ogre::uint32 visibilityMask, const float limit = 300000); std::pair distToClosest(const Ogre::Vector3 &position, Ogre::uint32 visibilityMask, const float limit = 100.0f);