mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 18:29:48 +02:00
- attempt to fix crash on windows when server exits game
This commit is contained in:
@@ -154,6 +154,7 @@ void ClientInterface::update() {
|
|||||||
Chrono chrono;
|
Chrono chrono;
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled) chrono.start();
|
||||||
|
|
||||||
|
try {
|
||||||
NetworkMessageCommandList networkMessageCommandList(currentFrameCount);
|
NetworkMessageCommandList networkMessageCommandList(currentFrameCount);
|
||||||
|
|
||||||
//send as many commands as we can
|
//send as many commands as we can
|
||||||
@@ -190,6 +191,18 @@ void ClientInterface::update() {
|
|||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 1) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took %lld msecs\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 1) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took %lld msecs\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch(const megaglest_runtime_error &ex) {
|
||||||
|
if(this->isConnected() == false) {
|
||||||
|
string sErr = string(extractFileFromDirectoryPath(__FILE__).c_str()) + "::" + string(__FUNCTION__) + " network error: " + string(ex.what());
|
||||||
|
|
||||||
|
DisplayErrorMessage(sErr);
|
||||||
|
quit= true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw megaglest_runtime_error(ex.what());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 1) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took %lld msecs\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugPerformance).enabled && chrono.getMillis() > 1) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s Line: %d] took %lld msecs\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,chrono.getMillis());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user