Issue #19: fixed exception handling in engine's frame listener

This commit is contained in:
Marc Zinnschlag 2011-10-06 12:34:13 +02:00
parent 10778d8c3e
commit 3bef04cb1d

View file

@ -73,8 +73,9 @@ void OMW::Engine::executeLocalScripts()
mEnvironment.mWorld->getLocalScripts().setIgnore (MWWorld::Ptr());
}
bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
{
try
{
if(mShowFPS)
{
@ -91,7 +92,6 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
MWWorld::Ptr::CellStore *current = mEnvironment.mWorld->getPlayer().getPlayer().getCell();
//If the region has changed
if(!(current->cell->data.flags & current->cell->Interior) && timer.elapsed() >= 10){
timer.restart();
@ -149,8 +149,6 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
test.name = "";
}
try
{
mEnvironment.mFrameDuration = evt.timeSinceLastFrame;
//
@ -205,7 +203,6 @@ bool OMW::Engine::frameRenderingQueued (const Ogre::FrameEvent& evt)
{
std::cerr << "Error in framelistener: " << e.what() << std::endl;
}
//std::cout << "TESTING2";
return true;
}