Changed: Using RZ_NO_CLIENT to include CClientConfig from client without adding other dependencies

This commit is contained in:
kervala 2010-08-03 14:03:15 +02:00
parent aa6df6f3b9
commit 704eb279e2

View file

@ -225,11 +225,13 @@ const string ConfigFileName = "client.cfg";
//////////// ////////////
// EXTERN // // EXTERN //
//////////// ////////////
#ifndef RZ_NO_CLIENT
extern NL3D::UScene *Scene; extern NL3D::UScene *Scene;
extern NL3D::UDriver *Driver; extern NL3D::UDriver *Driver;
extern CRyzomTime RT; extern CRyzomTime RT;
extern string Cookie; extern string Cookie;
extern string FSAddr; extern string FSAddr;
#endif
///////////// /////////////
// METHODS // // METHODS //
@ -860,6 +862,7 @@ void CClientConfig::setValues()
READ_STRING_DEV(FreeTrialURL) READ_STRING_DEV(FreeTrialURL)
READ_STRING_DEV(LoginSupportURL) READ_STRING_DEV(LoginSupportURL)
#ifndef RZ_NO_CLIENT
// if cookie is not empty, it means that the client was launch // if cookie is not empty, it means that the client was launch
// by the nel_launcher, so it can't be local // by the nel_launcher, so it can't be local
if(!Cookie.empty()) if(!Cookie.empty())
@ -871,6 +874,7 @@ void CClientConfig::setValues()
{ {
nlassert (FSAddr.empty()); nlassert (FSAddr.empty());
} }
#endif
///////////////// /////////////////
// USER ENTITY // // USER ENTITY //
@ -1392,6 +1396,7 @@ void CClientConfig::setValues()
} }
} }
#ifndef RZ_NO_CLIENT
// printf commands in loading screens // printf commands in loading screens
ClientCfg.PrintfCommands.clear(); ClientCfg.PrintfCommands.clear();
ClientCfg.PrintfCommandsFreeTrial.clear(); ClientCfg.PrintfCommandsFreeTrial.clear();
@ -1424,6 +1429,7 @@ void CClientConfig::setValues()
} }
} }
} }
#endif
READ_INT_FV(LoadingStringCount) READ_INT_FV(LoadingStringCount)
@ -1668,6 +1674,8 @@ void CClientConfig::setValues()
cfgWarning("No 'OffImpactFX'"); cfgWarning("No 'OffImpactFX'");
#endif // !FINAL_VERSION #endif // !FINAL_VERSION
#ifndef RZ_NO_CLIENT
////////// //////////
// INIT // // INIT //
// FPU // FPU
@ -1773,6 +1781,7 @@ void CClientConfig::setValues()
RT.resetTickOffset(); RT.resetTickOffset();
RT.increaseTickOffset( tickOffset ); RT.increaseTickOffset( tickOffset );
} }
#endif
// for reset effect of variable in mainLoop(), set true // for reset effect of variable in mainLoop(), set true
ClientCfg.IsInvalidated= true; ClientCfg.IsInvalidated= true;
@ -2043,6 +2052,7 @@ void CClientConfig::init(const string &configFileName)
//----------------------------------------------- //-----------------------------------------------
void CClientConfig::release () void CClientConfig::release ()
{ {
#ifndef RZ_NO_CLIENT
// Do we have to save the cfg file ? // Do we have to save the cfg file ?
if (ClientCfg.SaveConfig) if (ClientCfg.SaveConfig)
{ {
@ -2099,6 +2109,7 @@ void CClientConfig::release ()
// Save it // Save it
ClientCfg.ConfigFile.save (); ClientCfg.ConfigFile.save ();
} }
#endif
} }
bool CClientConfig::readBool (const std::string &varName) bool CClientConfig::readBool (const std::string &varName)