diff --git a/nel/include/nel/net/unified_network.h b/nel/include/nel/net/unified_network.h index d380427b6..df735a740 100644 --- a/nel/include/nel/net/unified_network.h +++ b/nel/include/nel/net/unified_network.h @@ -662,6 +662,7 @@ private: std::vector _UpUniCallback; TNameMappedCallback _DownCallbacks; std::vector _DownUniCallback; + std::set> _NotifiedUpCallbacks; /// Recording state CCallbackNetBase::TRecordingState _RecordingState; diff --git a/nel/src/net/unified_network.cpp b/nel/src/net/unified_network.cpp index 5a6034e18..ca3ef37d7 100644 --- a/nel/src/net/unified_network.cpp +++ b/nel/src/net/unified_network.cpp @@ -2090,6 +2090,14 @@ void CUnifiedNetwork::addNetworkAssociation (const string &networkName, uint8 ni void CUnifiedNetwork::callServiceUpCallback (const std::string &serviceName, TServiceId sid, bool callGlobalCallback) { + std::pair pss = std::make_pair(serviceName, sid); + if (_NotifiedUpCallbacks.find(pss) != _NotifiedUpCallbacks.end()) + { + nlwarning("HNETL5: Attempt to call service UP callback twice for '%s', ignored!", serviceName.c_str()); + return; + } + _NotifiedUpCallbacks.insert(pss); + // now we warn the user CUnifiedNetwork::TNameMappedCallback::iterator it = _UpCallbacks.find(serviceName); if (it != _UpCallbacks.end()) @@ -2119,6 +2127,14 @@ void CUnifiedNetwork::callServiceUpCallback (const std::string &serviceName, TSe void CUnifiedNetwork::callServiceDownCallback (const std::string &serviceName, TServiceId sid, bool callGlobalCallback) { + std::pair pss = std::make_pair(serviceName, sid); + if (_NotifiedUpCallbacks.find(pss) == _NotifiedUpCallbacks.end()) + { + nlwarning("HNETL5: Attempt to call service DOWN callback twice for '%s', ignored!", serviceName.c_str()); + return; + } + _NotifiedUpCallbacks.erase(pss); + // now we warn the user CUnifiedNetwork::TNameMappedCallback::iterator it = _DownCallbacks.find(serviceName); if (it != _DownCallbacks.end()) diff --git a/nel/tools/build_gamedata/c1_shard_patch.py b/nel/tools/build_gamedata/c1_shard_patch.py index b67b053a8..e67314cd8 100755 --- a/nel/tools/build_gamedata/c1_shard_patch.py +++ b/nel/tools/build_gamedata/c1_shard_patch.py @@ -49,6 +49,9 @@ printLog(log, "-------") printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, "") +# Find tools +SevenZip = findTool(log, ToolDirectories, SevenZipTool, ToolSuffix) + # List the directories that will be used archiveDirectories = [ ] for dir in InstallShardDataDirectories: @@ -89,23 +92,29 @@ else: printLog(log, "") if not args.admininstall: - printLog(log, ">>> Create new version <<<") - newVersion = 1 - vstr = str(newVersion).zfill(6) - vpath = PatchmanBridgeServerDirectory + "/" + vstr - while os.path.exists(vpath): - newVersion = newVersion + 1 + if SevenZip == "": + toolLogFail(log, SevenZipTool, ToolSuffix) + else: + printLog(log, ">>> Create new version <<<") + newVersion = 1 vstr = str(newVersion).zfill(6) vpath = PatchmanBridgeServerDirectory + "/" + vstr - mkPath(log, vpath) - for dir in archiveDirectories: - mkPath(log, ShardInstallDirectory + "/" + dir) - tgzPath = vpath + "/" + dir + ".tgz" - printLog(log, "WRITE " + tgzPath) - tar = tarfile.open(tgzPath, "w:gz") - tar.add(ShardInstallDirectory + "/" + dir, arcname = dir) - tar.close() - printLog(log, "") + while os.path.exists(vpath): + newVersion = newVersion + 1 + vstr = str(newVersion).zfill(6) + vpath = PatchmanBridgeServerDirectory + "/" + vstr + mkPath(log, vpath) + for dir in archiveDirectories: + mkPath(log, ShardInstallDirectory + "/" + dir) + # tgzPath = vpath + "/" + dir + ".tgz" + # printLog(log, "WRITE " + tgzPath) + # tar = tarfile.open(tgzPath, "w:gz") + # tar.add(ShardInstallDirectory + "/" + dir, arcname = dir) + # tar.close() + sevenZipPath = vpath + "/" + dir + ".7z" + printLog(log, "WRITE " + sevenZipPath) + subprocess.call([ SevenZip, "a", sevenZipPath, ShardInstallDirectory + "/" + dir ]) + printLog(log, "") log.close() if os.path.isfile("c1_shard_patch.log"): diff --git a/nel/tools/build_gamedata/configuration/tools.py b/nel/tools/build_gamedata/configuration/tools.py index ebb1d07da..ee933c8e9 100755 --- a/nel/tools/build_gamedata/configuration/tools.py +++ b/nel/tools/build_gamedata/configuration/tools.py @@ -98,3 +98,4 @@ PatchGenTool = "patch_gen" TranslationToolsTool = "translation_tools" BuildWorldPackedColTool = "build_world_packed_col" R2IslandsTexturesTool = "r2_islands_textures" +SevenZipTool = "7za" diff --git a/ryzom/client/src/main_loop.cpp b/ryzom/client/src/main_loop.cpp index cd30a25bc..0f468e31c 100644 --- a/ryzom/client/src/main_loop.cpp +++ b/ryzom/client/src/main_loop.cpp @@ -2510,9 +2510,6 @@ bool mainLoop() Actions.enable(true); EditActions.enable(true); - // For stoping the outgame music, start after 30 frames, and duration of 3 seconds - outgameFader = CMusicFader(60, 3); - // check for banned player if (testPermanentBanMarkers()) { @@ -2522,6 +2519,9 @@ bool mainLoop() } } + // For stoping the outgame music, start after 30 frames, and duration of 3 seconds + outgameFader = CMusicFader(60, 3); + // Short reinit of the main loop after farTP or character reselection Ping.init(); updateLightDesc();