Merge branch 'develop' into ryzomclassic-develop

ryzomclassic-develop
kaetemi 5 years ago
commit 0528df7f0b

@ -662,6 +662,7 @@ private:
std::vector<TCallbackArgItem> _UpUniCallback; std::vector<TCallbackArgItem> _UpUniCallback;
TNameMappedCallback _DownCallbacks; TNameMappedCallback _DownCallbacks;
std::vector<TCallbackArgItem> _DownUniCallback; std::vector<TCallbackArgItem> _DownUniCallback;
std::set<std::pair<std::string, TServiceId>> _NotifiedUpCallbacks;
/// Recording state /// Recording state
CCallbackNetBase::TRecordingState _RecordingState; CCallbackNetBase::TRecordingState _RecordingState;

@ -2090,6 +2090,14 @@ void CUnifiedNetwork::addNetworkAssociation (const string &networkName, uint8 ni
void CUnifiedNetwork::callServiceUpCallback (const std::string &serviceName, TServiceId sid, bool callGlobalCallback) void CUnifiedNetwork::callServiceUpCallback (const std::string &serviceName, TServiceId sid, bool callGlobalCallback)
{ {
std::pair<std::string, TServiceId> 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 // now we warn the user
CUnifiedNetwork::TNameMappedCallback::iterator it = _UpCallbacks.find(serviceName); CUnifiedNetwork::TNameMappedCallback::iterator it = _UpCallbacks.find(serviceName);
if (it != _UpCallbacks.end()) 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) void CUnifiedNetwork::callServiceDownCallback (const std::string &serviceName, TServiceId sid, bool callGlobalCallback)
{ {
std::pair<std::string, TServiceId> 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 // now we warn the user
CUnifiedNetwork::TNameMappedCallback::iterator it = _DownCallbacks.find(serviceName); CUnifiedNetwork::TNameMappedCallback::iterator it = _DownCallbacks.find(serviceName);
if (it != _DownCallbacks.end()) if (it != _DownCallbacks.end())

@ -49,6 +49,9 @@ printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time()))) printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "") printLog(log, "")
# Find tools
SevenZip = findTool(log, ToolDirectories, SevenZipTool, ToolSuffix)
# List the directories that will be used # List the directories that will be used
archiveDirectories = [ ] archiveDirectories = [ ]
for dir in InstallShardDataDirectories: for dir in InstallShardDataDirectories:
@ -89,6 +92,9 @@ else:
printLog(log, "") printLog(log, "")
if not args.admininstall: if not args.admininstall:
if SevenZip == "":
toolLogFail(log, SevenZipTool, ToolSuffix)
else:
printLog(log, ">>> Create new version <<<") printLog(log, ">>> Create new version <<<")
newVersion = 1 newVersion = 1
vstr = str(newVersion).zfill(6) vstr = str(newVersion).zfill(6)
@ -100,11 +106,14 @@ if not args.admininstall:
mkPath(log, vpath) mkPath(log, vpath)
for dir in archiveDirectories: for dir in archiveDirectories:
mkPath(log, ShardInstallDirectory + "/" + dir) mkPath(log, ShardInstallDirectory + "/" + dir)
tgzPath = vpath + "/" + dir + ".tgz" # tgzPath = vpath + "/" + dir + ".tgz"
printLog(log, "WRITE " + tgzPath) # printLog(log, "WRITE " + tgzPath)
tar = tarfile.open(tgzPath, "w:gz") # tar = tarfile.open(tgzPath, "w:gz")
tar.add(ShardInstallDirectory + "/" + dir, arcname = dir) # tar.add(ShardInstallDirectory + "/" + dir, arcname = dir)
tar.close() # tar.close()
sevenZipPath = vpath + "/" + dir + ".7z"
printLog(log, "WRITE " + sevenZipPath)
subprocess.call([ SevenZip, "a", sevenZipPath, ShardInstallDirectory + "/" + dir ])
printLog(log, "") printLog(log, "")
log.close() log.close()

@ -98,3 +98,4 @@ PatchGenTool = "patch_gen"
TranslationToolsTool = "translation_tools" TranslationToolsTool = "translation_tools"
BuildWorldPackedColTool = "build_world_packed_col" BuildWorldPackedColTool = "build_world_packed_col"
R2IslandsTexturesTool = "r2_islands_textures" R2IslandsTexturesTool = "r2_islands_textures"
SevenZipTool = "7za"

@ -2510,9 +2510,6 @@ bool mainLoop()
Actions.enable(true); Actions.enable(true);
EditActions.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 // check for banned player
if (testPermanentBanMarkers()) 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 // Short reinit of the main loop after farTP or character reselection
Ping.init(); Ping.init();
updateLightDesc(); updateLightDesc();

Loading…
Cancel
Save