mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-10-02 09:31:12 -04:00
made engine framelistener more crash-resistant
This commit is contained in:
parent
be8f852663
commit
7cd40fc7e4
@ -56,6 +56,8 @@ void OMW::Engine::executeLocalScripts()
|
|||||||
|
|
||||||
bool OMW::Engine::frameStarted(const Ogre::FrameEvent& evt)
|
bool OMW::Engine::frameStarted(const Ogre::FrameEvent& evt)
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
mEnvironment.mFrameDuration = evt.timeSinceLastFrame;
|
mEnvironment.mFrameDuration = evt.timeSinceLastFrame;
|
||||||
|
|
||||||
// global scripts
|
// global scripts
|
||||||
@ -98,6 +100,11 @@ bool OMW::Engine::frameStarted(const Ogre::FrameEvent& evt)
|
|||||||
|
|
||||||
focusFrameCounter = 0;
|
focusFrameCounter = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (const std::exception& e)
|
||||||
|
{
|
||||||
|
std::cerr << "Error in framelistener: " << e.what() << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user