diff --git a/source/glest_game/network/network_manager.cpp b/source/glest_game/network/network_manager.cpp index dece64a4..1b498700 100644 --- a/source/glest_game/network/network_manager.cpp +++ b/source/glest_game/network/network_manager.cpp @@ -36,6 +36,10 @@ NetworkManager::NetworkManager() { if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] this->networkRole = %d gameNetworkInterface [%p]\n",__FILE__,__FUNCTION__,__LINE__,this->networkRole,gameNetworkInterface); } +NetworkManager::~NetworkManager() { + end(); +} + void NetworkManager::init(NetworkRole networkRole, bool publishEnabled) { if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] this->networkRole = %d, networkRole = %d, gameNetworkInterface [%p]\n",__FILE__,__FUNCTION__,__LINE__,this->networkRole,networkRole,gameNetworkInterface); diff --git a/source/glest_game/network/network_manager.h b/source/glest_game/network/network_manager.h index 910b2800..d4c85911 100644 --- a/source/glest_game/network/network_manager.h +++ b/source/glest_game/network/network_manager.h @@ -36,6 +36,8 @@ public: static NetworkManager &getInstance(); NetworkManager(); + virtual ~NetworkManager(); + void init(NetworkRole networkRole,bool publishEnabled=false); void end(); void update(); diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index c1c7badb..bf7c2faf 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -3542,7 +3542,7 @@ void Unit::logSynchData(string file,int line,string source) { SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s ",source.c_str()); } SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"%s\n",szBuf); - SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"------------------------------------ END [[FRAME %d UNIT: %d - %s] ------------------------------------------------\n",getFrameCount(),this->id,this->getType()->getName().c_str()); + SystemFlags::OutputDebug(SystemFlags::debugWorldSynch,"------------------------------------ END [FRAME %d UNIT: %d - %s] ------------------------------------------------\n",getFrameCount(),this->id,this->getType()->getName().c_str()); } } }