From 05d6b16b9c57223cccb55fb08a0dc9016fea8b26 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 9 Apr 2020 18:49:40 +0800 Subject: [PATCH 1/3] Fix loading music fadeout on far TP between ring and mainland --- ryzom/client/src/main_loop.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ryzom/client/src/main_loop.cpp b/ryzom/client/src/main_loop.cpp index 172c4056b..356b00452 100644 --- a/ryzom/client/src/main_loop.cpp +++ b/ryzom/client/src/main_loop.cpp @@ -2517,9 +2517,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()) { @@ -2529,6 +2526,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(); From 9b0852a91d5437dc9acab8f0a825cc6b974d5dd3 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 10 Apr 2020 09:59:11 +0800 Subject: [PATCH 2/3] Protect from duplicate UP and DOWN callbacks, fix ryzom/ryzomcore#601 --- nel/include/nel/net/unified_network.h | 1 + nel/src/net/unified_network.cpp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) 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()) From 5c0c6d24178a1e63c49e72941ea7714adf7d42fc Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 11 Apr 2020 11:52:09 +0800 Subject: [PATCH 3/3] Generate 7z server patch, ref ryzom/ryzomcore#586 --- nel/tools/build_gamedata/c1_shard_patch.py | 39 ++++++++++++------- .../build_gamedata/configuration/tools.py | 1 + 2 files changed, 25 insertions(+), 15 deletions(-) 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"