|
|
@ -3,6 +3,7 @@
|
|
|
|
#include <cassert>
|
|
|
|
#include <cassert>
|
|
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include <utility>
|
|
|
|
|
|
|
|
|
|
|
|
#include <components/misc/fileops.hpp>
|
|
|
|
#include <components/misc/fileops.hpp>
|
|
|
|
#include <components/bsa/bsa_archive.hpp>
|
|
|
|
#include <components/bsa/bsa_archive.hpp>
|
|
|
@ -68,6 +69,15 @@ bool OMW::Engine::frameStarted(const Ogre::FrameEvent& evt)
|
|
|
|
// update actors
|
|
|
|
// update actors
|
|
|
|
mEnvironment.mMechanicsManager->update();
|
|
|
|
mEnvironment.mMechanicsManager->update();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (focusFrameCounter++ == focusUpdateFrame)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
std::pair<std::string, float> handle = mEnvironment.mWorld->getMWScene()->getFacedHandle();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
std::cout << "Object: " << handle.first << ", distance: " << handle.second << std::endl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
focusFrameCounter = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -230,6 +240,8 @@ void OMW::Engine::go()
|
|
|
|
MWInput::MWInputManager input(mOgre, mEnvironment.mWorld->getPlayerPos(),
|
|
|
|
MWInput::MWInputManager input(mOgre, mEnvironment.mWorld->getPlayerPos(),
|
|
|
|
*mEnvironment.mWindowManager, mDebug);
|
|
|
|
*mEnvironment.mWindowManager, mDebug);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
focusFrameCounter = 0;
|
|
|
|
|
|
|
|
|
|
|
|
std::cout << "\nPress Q/ESC or close window to exit.\n";
|
|
|
|
std::cout << "\nPress Q/ESC or close window to exit.\n";
|
|
|
|
|
|
|
|
|
|
|
|
mOgre.getRoot()->addFrameListener (this);
|
|
|
|
mOgre.getRoot()->addFrameListener (this);
|
|
|
|