Merge branch 'develop' into ryzomclassic-develop

ryzomclassic-develop
Jan Boon 5 years ago
commit b0fdfaeca9

@ -974,37 +974,6 @@ void CAudioMixerUser::buildSampleBankList()
CPath::addSearchPath(sbp);
}
/// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file.
std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir)
{
CGroupControllerRoot *tempRoot = NULL;
if (!CGroupControllerRoot::isInitialized())
tempRoot = new CGroupControllerRoot();
std::string dir = CPath::standardizePath(packedSheetDir, true);
CSoundBank *soundBank = new CSoundBank();
soundBank->load(dir, true);
delete soundBank;
delete tempRoot;
return dir + "sounds.packed_sheets";
}
/// Build the cluster sound_group sheets.
std::string UAudioMixer::buildClusteredSoundGroupSheets(const std::string &packedSheetDir)
{
std::string dir = CPath::standardizePath(packedSheetDir, true);
CClusteredSound::buildSheets(dir);
return dir + "sound_groups.packed_sheets";
}
/// Build the user var binding sheets.
std::string UAudioMixer::buildUserVarBindingSheets(const std::string &packedSheetDir)
{
std::string dir = CPath::standardizePath(packedSheetDir, true);
std::map<std::string, CUserVarSerializer> container;
::loadForm("user_var_binding", dir + "user_var_binding.packed_sheets", container, true, false);
return dir + "user_var_binding.packed_sheets";
}
void CAudioMixerUser::setBackgroundFlagName(uint flagIndex, const std::string &flagName)
{
if (flagIndex < TBackgroundFlags::NB_BACKGROUND_FLAGS)
@ -1144,6 +1113,37 @@ void CAudioMixerUser::initUserVar()
}
/// Build the sound bank packed sheets file from georges sound sheet files with .sound extension in the search path, and return the path to the written file.
std::string UAudioMixer::buildSoundBank(const std::string &packedSheetDir)
{
CGroupControllerRoot *tempRoot = NULL;
if (!CGroupControllerRoot::isInitialized())
tempRoot = new CGroupControllerRoot();
std::string dir = CPath::standardizePath(packedSheetDir, true);
CSoundBank *soundBank = new CSoundBank();
soundBank->load(dir, true);
delete soundBank;
delete tempRoot;
return dir + "sounds.packed_sheets";
}
/// Build the cluster sound_group sheets.
std::string UAudioMixer::buildClusteredSoundGroupSheets(const std::string &packedSheetDir)
{
std::string dir = CPath::standardizePath(packedSheetDir, true);
CClusteredSound::buildSheets(dir);
return dir + "sound_groups.packed_sheets";
}
/// Build the user var binding sheets.
std::string UAudioMixer::buildUserVarBindingSheets(const std::string &packedSheetDir)
{
std::string dir = CPath::standardizePath(packedSheetDir, true);
std::map<std::string, CUserVarSerializer> container;
::loadForm("user_var_binding", dir + "user_var_binding.packed_sheets", container, true, false);
return dir + "user_var_binding.packed_sheets";
}
// ******************************************************************
void CAudioMixerUser::CControledSources::serial(NLMISC::IStream &s)

@ -41,15 +41,18 @@ Gamma_max = 1.0;
Application = { "ryzom_open", "./client_ryzom_r.exe", "./" };
BackgroundDownloader = 0;
SignUpURL = "";
StartupHost = "shard.ryzomcore.org:40916";
SignUpURL = "https://open.ryzom.dev/ams/?page=register";
StartupHost = "https://open.ryzom.dev";
StartupPage = "/login/r2_login.php";
InstallStatsUrl = "http://open.ryzom.com:50000/stats/stats.php";
CreateAccountURL = "http://shard.ryzomcore.org/ams/?page=register";
EditAccountURL = "http://shard.ryzomcore.org/ams/?page=settings";
StartupVerify = 1;
InstallStatsUrl = "https://open.ryzom.dev/stats/stats.php";
CreateAccountURL = "https://open.ryzom.dev/ams/?page=register";
EditAccountURL = "https://open.ryzom.dev/ams/?page=settings";
ConditionsTermsURL = "http://www.gnu.org/licenses/agpl-3.0.html";
ForgetPwdURL = "http://shard.ryzomcore.org/ams/?page=forgot_password";
LoginSupportURL = "https://plus.google.com/u/0/communities/103798956862568269036";
ForgetPwdURL = "https://open.ryzom.dev/ams/?page=forgot_password";
LoginSupportURL = "https://open.ryzom.dev/ams/";
NamingPolicyURL = "https://open.ryzom.dev/ams/";
InstallWebPage = "";
// Full path and filename where cURL can find certificate bundle file
@ -90,12 +93,12 @@ XMLOutGameInterfaceFiles = {
TexturesInterface = "texture_interfaces_v3";
TexturesInterfaceDXTC = "texture_interfaces_dxtc";
// The ligo primitive class file
LigoPrimitiveClass = "world_editor_classes.xml";
VerboseLog = 1;
///////////
// MOUSE //
///////////
@ -600,11 +603,10 @@ HelpPages =
// interval in minutes for webig notify thread to run
WebIgNotifInterval = 10;
WebIgMainDomain = "app.ryzom.com";
WebIgMainDomain = "https://open.ryzom.dev";
WebIgTrustedDomains = {
"api.ryzom.com", "app.ryzom.com"
"open.ryzom.dev"
};
PatchletUrl = "http://app.ryzom.com/app_patchlet/index.php?patch=preload";
SelectedSlot = 0;

@ -317,6 +317,10 @@ int main(int argc, char **argv)
LoginCustomParameters = "&steam_auth_session_ticket=" + steamClient.getAuthSessionTicket();
#endif
#if !FINAL_VERSION
LoginCustomParameters += "&dbg=1";
#endif
// initialize patch manager and set the ryzom full path, before it's used
CPatchManager *pPM = CPatchManager::getInstance();
pPM->setRyzomFilename(Args.getProgramPath() + Args.getProgramName());

@ -321,15 +321,9 @@ CClientConfig::CClientConfig()
TexturesLoginInterface.push_back("texture_interfaces_v3_login");
DisplayAccountButtons = true;
#ifdef RYZOM_FORGE
CreateAccountURL = "https://account.ryzom.com/signup/from_client.php";
EditAccountURL = "https://account.ryzom.com/payment_profile/index.php";
ForgetPwdURL = "https://account.ryzom.com/payment_profile/lost_secure_password.php";
#else
CreateAccountURL = "https://classic.ryzom.dev/signup/from_client.php";
EditAccountURL = "https://classic.ryzom.dev/payment_profile/index.php";
ForgetPwdURL = "https://classic.ryzom.dev/payment_profile/lost_secure_password.php";
#endif
Position = CVector(0.f, 0.f, 0.f); // Default Position.
Heading = CVector(0.f, 1.f, 0.f); // Default Heading.
EyesHeight = 1.5f; // Default User Eyes Height.
@ -425,15 +419,15 @@ CClientConfig::CClientConfig()
PatchletUrl.clear();
PatchVersion.clear();
WebIgMainDomain = "classic.ryzom.dev";
WebIgTrustedDomains.push_back(WebIgMainDomain);
WebIgMainDomain = "https://classic.ryzom.dev";
WebIgTrustedDomains.push_back("classic.ryzom.dev");
WebIgNotifInterval = 10; // time in minutes
CurlMaxConnections = 5;
CurlCABundle.clear();
RingReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes_ring/index.php";
ReleaseNotePath = "http://" + WebIgMainDomain + "/releasenotes/index.php";
RingReleaseNotePath = WebIgMainDomain + "/releasenotes_ring/index.php";
ReleaseNotePath = WebIgMainDomain + "/releasenotes/index.php";
///////////////
@ -449,7 +443,7 @@ CClientConfig::CClientConfig()
SoundOn = true; // Default is with sound.
DriverSound = SoundDrvAuto;
SoundForceSoftwareBuffer = true;
SoundOutGameMusic = "Main Menu Loop.ogg";
SoundOutGameMusic = "main menu loop.ogg";
SoundSFXVolume = 1.f;
SoundGameMusicVolume = 1.f;
SoundTPFade = 500;
@ -1092,6 +1086,9 @@ void CClientConfig::setValues()
///////////
// WEBIG //
READ_STRING_FV(WebIgMainDomain);
if (ClientCfg.WebIgMainDomain.find("http://") == std::string::npos
|| ClientCfg.WebIgMainDomain.find("https://") == std::string::npos)
ClientCfg.WebIgMainDomain = "http://" + ClientCfg.WebIgMainDomain;
READ_STRINGVECTOR_FV(WebIgTrustedDomains);
READ_INT_FV(WebIgNotifInterval);
READ_INT_FV(CurlMaxConnections);

@ -63,7 +63,7 @@ bool CCurlHttpClient::authenticate(const std::string &user, const std::string &p
return true;
}
static const std::string CAFilename = "ssl_ca_cert.pem"; // this is the certificate "Thawte Server CA"
static const std::string CAFilename = "cacert.pem"; // https://curl.haxx.se/docs/caextract.html
// ***************************************************************************
bool CCurlHttpClient::verifyServer(bool verify)

@ -416,7 +416,7 @@ class CAHUIShowHide : public IActionHandler
nlwarning("%s is not a group html", window.c_str());
return;
}
pGH->setURL("http://"+ClientCfg.WebIgMainDomain+"/index.php?app="+webapp);
pGH->setURL(ClientCfg.WebIgMainDomain + "/index.php?app=" + webapp);
}
}
else

@ -267,7 +267,7 @@ public:
uint c = 0;
while (_Running)
{
string url = "https://"+domain+"/index.php?app=notif&format=lua&rnd="+randomString();
string url = domain + "/index.php?app=notif&format=lua&rnd=" + randomString();
addWebIGParams(url, true);
get(url);

@ -156,7 +156,8 @@ CLoginStateMachine LoginSM;
bool CStartupHttpClient::connectToLogin()
{
return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0));
return connect(ClientCfg.ConfigFile.getVar("StartupHost").asString(0))
&& verifyServer(ClientCfg.ConfigFile.getVar("StartupVerify").asBool(0));
}
CStartupHttpClient HttpClient;
@ -2827,7 +2828,36 @@ string checkLogin(const string &login, const string &password, const string &cli
if(res.empty())
return "Empty answer from server (error code 62)";
if(res[0] == '0')
size_t first = res.find("\n\n");
if (first == std::string::npos)
{
first = res.find("\r\r");
if (first == std::string::npos)
{
first = res.find("\r\n\r\n");
if (first != std::string::npos)
{
res = res.substr(first + 4);
}
}
else
{
res = res.substr(first + 2);
}
}
else
{
res = res.substr(first + 2);
}
nldebug("res1: %s", res.c_str());
if (res[0] == 'H')
{
nlwarning("missing response body: %s", res.c_str());
return "missing response body (error code 64)";
}
else if(res[0] == '0')
{
// server returns an error
nlwarning("server error: %s", res.substr(2).c_str());
@ -2880,7 +2910,36 @@ string checkLogin(const string &login, const string &password, const string &cli
if(res.empty())
return "Empty answer from server (error code 4)";
if(res[0] == '0')
size_t first = res.find("\n\n");
if (first == std::string::npos)
{
first = res.find("\r\r");
if (first == std::string::npos)
{
first = res.find("\r\n\r\n");
if (first != std::string::npos)
{
res = res.substr(first + 4);
}
}
else
{
res = res.substr(first + 2);
}
}
else
{
res = res.substr(first + 2);
}
nldebug("res2: %s", res.c_str());
if (res[0] == 'H')
{
nlwarning("missing response body: %s", res.c_str());
return "missing response body (error code 65)";
}
else if(res[0] == '0')
{
// server returns an error
nlwarning("server error: %s", res.substr(2).c_str());
@ -2962,7 +3021,36 @@ string checkLogin(const string &login, const string &password, const string &cli
if(res.empty())
return "Empty answer from server (error code 4)";
if(res[0] == '0')
size_t first = res.find("\n\n");
if (first == std::string::npos)
{
first = res.find("\r\r");
if (first == std::string::npos)
{
first = res.find("\r\n\r\n");
if (first != std::string::npos)
{
res = res.substr(first + 4);
}
}
else
{
res = res.substr(first + 2);
}
}
else
{
res = res.substr(first + 2);
}
nldebug("res2: %s", res.c_str());
if (res[0] == 'H')
{
nlwarning("missing response body: %s", res.c_str());
return "missing response body (error code 66)";
}
else if(res[0] == '0')
{
// server returns an error
nlwarning("server error: %s", res.substr(2).c_str());
@ -3067,7 +3155,36 @@ string selectShard(uint32 shardId, string &cookie, string &addr)
if(res.empty())
return "Empty result (error code 13)";
if(res[0] == '0')
size_t first = res.find("\n\n");
if (first == std::string::npos)
{
first = res.find("\r\r");
if (first == std::string::npos)
{
first = res.find("\r\n\r\n");
if (first != std::string::npos)
{
res = res.substr(first + 4);
}
}
else
{
res = res.substr(first + 2);
}
}
else
{
res = res.substr(first + 2);
}
nldebug("res2: %s", res.c_str());
if (res[0] == 'H')
{
nlwarning("missing response body: %s", res.c_str());
return "missing response body (error code 66)";
}
else if(res[0] == '0')
{
// server returns an error
nlwarning("server error: %s", res.substr(2).c_str());

@ -19,7 +19,7 @@
#define CL_LOGIN_H
#include "nel/misc/types_nl.h"
#include "game_share/http_client.h"
#include "http_client_curl.h"
#include <string>
#include <vector>
@ -74,7 +74,7 @@ extern sint32 ShardSelected;
/*
* HTTP client preconfigured to connect to the startup login host
*/
class CStartupHttpClient : public CHttpClient
class CStartupHttpClient : public CCurlHttpClient
{
public:

@ -3290,7 +3290,7 @@ private:
if(i != digitMaxEnd)
{
ucstring web_app = contentStr.substr(digitStart, i-digitStart);
contentStr = ucstring("http://"+ClientCfg.WebIgMainDomain+"/")+web_app+ucstring("/index.php?")+contentStr.substr(i+1);
contentStr = ucstring(ClientCfg.WebIgMainDomain + "/") + web_app + ucstring("/index.php?") + contentStr.substr((size_t)i + 1);
}
else
{

Loading…
Cancel
Save