diff --git a/apps/opencs/view/render/pagedworldspacewidget.cpp b/apps/opencs/view/render/pagedworldspacewidget.cpp index 0c53fd41d..d2cc74587 100644 --- a/apps/opencs/view/render/pagedworldspacewidget.cpp +++ b/apps/opencs/view/render/pagedworldspacewidget.cpp @@ -199,6 +199,7 @@ void CSVRender::PagedWorldspaceWidget::mouseReleaseEvent (QMouseEvent *event) float mouseY = (float) event->y()/viewportHeight; getPhysics()->castRay(mouseX, mouseY, NULL, NULL, getCamera()); + flagAsModified(); #if 0 std::cout << "geometry: " + std::to_string(width()) + ", " + std::to_string(height()) << std::endl; std::cout << "event: " + std::to_string(event->x()) + ", " + std::to_string(event->y()) << std::endl; diff --git a/apps/opencs/view/world/physicssystem.cpp b/apps/opencs/view/world/physicssystem.cpp index 77466d746..eeedfbb00 100644 --- a/apps/opencs/view/world/physicssystem.cpp +++ b/apps/opencs/view/world/physicssystem.cpp @@ -4,11 +4,11 @@ #include #include +#include #include // FIXME: debug cursor position #include // FIXME: visual highlight, clone #include // FIXME: visual highlight, material #include // FIXME: visual highlight, texture -#include // FIXME: renderOneFrame #include #include @@ -133,7 +133,6 @@ namespace CSVWorld { mEngine->toggleDebugRendering(); mEngine->stepSimulation(0.0167); // FIXME: DebugDrawer::step() not accessible - Ogre::Root::getSingleton().renderOneFrame(); // FIXME: temporary workaround for immediate visual feedback } std::pair PhysicsSystem::castRay(float mouseX, float mouseY, @@ -167,7 +166,7 @@ namespace CSVWorld { //TODO: Try http://www.ogre3d.org/tikiwiki/Create+outline+around+a+character Ogre::SceneNode *scene = mSceneMgr->getSceneNode(result.first); - std::map>::iterator iter = + std::map >::iterator iter = mSelectedEntities.find(result.first); if(iter != mSelectedEntities.end()) // currently selected { @@ -217,8 +216,6 @@ namespace CSVWorld // FIXME: show cursor position for debugging showHitPoint(mSceneMgr, result.first, ray.getPoint(farClipDist*result.second)); } - // FIXME: temporary workaround for immediate visual feedback - Ogre::Root::getSingleton().renderOneFrame(); #if 0 std::cout << "hit " << result.first + " result " + std::to_string(result.second*farClipDist) << std::endl; diff --git a/apps/opencs/view/world/physicssystem.hpp b/apps/opencs/view/world/physicssystem.hpp index 5b49e3872..ec0657ee2 100644 --- a/apps/opencs/view/world/physicssystem.hpp +++ b/apps/opencs/view/world/physicssystem.hpp @@ -1,6 +1,7 @@ #ifndef CSV_WORLD_PHYSICSSYSTEM_H #define CSV_WORLD_PHYSICSSYSTEM_H +#include #include #include @@ -27,7 +28,7 @@ namespace CSVWorld //std::map mHandleToMesh; OEngine::Physic::PhysicEngine* mEngine; Ogre::SceneManager *mSceneMgr; - std::map> mSelectedEntities; + std::map > mSelectedEntities; public: