From 647e88003eb1d756e8cf5eef11bc63edb6b43aa6 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Sat, 19 Mar 2011 19:54:18 +0100 Subject: [PATCH] build and activation fix --- CMakeLists.txt | 2 ++ apps/openmw/mwrender/mwscene.cpp | 40 ++------------------------------ libs/openengine | 2 +- 3 files changed, 5 insertions(+), 39 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d4aa0a30..957fc1b8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,6 +182,8 @@ set(OENGINE_BULLET ${LIBDIR}/openengine/bullet/CMotionState.h ${LIBDIR}/openengine/bullet/physic.cpp ${LIBDIR}/openengine/bullet/physic.hpp + ${LIBDIR}/openengine/bullet/BulletShapeLoader.cpp + ${LIBDIR}/openengine/bullet/BulletShapeLoader.h ) # Sound setup diff --git a/apps/openmw/mwrender/mwscene.cpp b/apps/openmw/mwrender/mwscene.cpp index ce54e8a19..dc4383ab3 100644 --- a/apps/openmw/mwrender/mwscene.cpp +++ b/apps/openmw/mwrender/mwscene.cpp @@ -69,44 +69,8 @@ std::pair MWScene::getFacedHandle (MWWorld::World& world) getViewport()->getHeight()/2); //let's avoid the capsule shape of the player. centerRay.setOrigin(centerRay.getOrigin() + 20*centerRay.getDirection()); - btVector3 from(centerRay.getOrigin().x,centerRay.getOrigin().y,centerRay.getOrigin().z); - btVector3 to(centerRay.getPoint(1000).x,centerRay.getPoint(1000).x,centerRay.getPoint(1000).x); - - // get all objects touched by the ray - /*getRaySceneQuery()->setRay (centerRay ); - RaySceneQueryResult &result = getRaySceneQuery()->execute(); - - RaySceneQueryResult::iterator nearest = result.end(); - - for (RaySceneQueryResult::iterator itr = result.begin(); - itr != result.end(); itr++ ) - { - // there seem to be omnipresent objects like the caelum sky dom, - // the distance of these objects is always 0 so this if excludes these - if ( itr->movable && itr->distance >= 0.1) - { - // horrible hack to exclude statics. this must be removed as soon as a replacement for the - // AABB raycasting is implemented (we should not ignore statics) - MWWorld::Ptr ptr = world.getPtrViaHandle (itr->movable->getParentSceneNode()->getName()); - if (ptr.getType()==typeid (ESM::Static)) - break; - - if ( nearest == result.end() ) //if no object is set - { - nearest = itr; - } - else if ( itr->distance < nearest->distance ) - { - nearest = itr; - } - } - } - - if ( nearest != result.end() ) - { - handle = nearest->movable->getParentSceneNode()->getName(); - distance = nearest->distance; - }*/ + btVector3 from(centerRay.getOrigin().x,-centerRay.getOrigin().z,centerRay.getOrigin().y); + btVector3 to(centerRay.getPoint(1000).x,-centerRay.getPoint(1000).z,centerRay.getPoint(1000).y); return eng->rayTest(from,to); } diff --git a/libs/openengine b/libs/openengine index 79fba7e77..25b3cf935 160000 --- a/libs/openengine +++ b/libs/openengine @@ -1 +1 @@ -Subproject commit 79fba7e77ed81f0e814d603315b1b4e5a1f4f309 +Subproject commit 25b3cf935967beb5011419b6d3911fca05863743