Move to feature-light_cycle: c5207e1f862a

This commit is contained in:
kaetemi 2014-12-22 14:10:37 +01:00
parent 936276f789
commit 7af4bb69d4
8 changed files with 7 additions and 26 deletions

View file

@ -300,9 +300,6 @@ void CContinentParameters::build(const NLGEORGES::UFormElm &item)
if(readSeason<EGSPD::CSeason::Invalid) if(readSeason<EGSPD::CSeason::Invalid)
ForceDisplayedSeason[season]= readSeason; ForceDisplayedSeason[season]= readSeason;
} }
// Read light cycle
item.getValueByName(LightCycle, "LightCycle");
} }
@ -396,8 +393,6 @@ void CContinentParameters::serial(class NLMISC::IStream &f) throw(NLMISC::EStrea
f.serial(SkySheet[i]); f.serial(SkySheet[i]);
f.serialEnum(ForceDisplayedSeason[i]); f.serialEnum(ForceDisplayedSeason[i]);
} }
//
f.serial(LightCycle);
} }
//========================================================================= //=========================================================================

View file

@ -62,12 +62,9 @@ public:
/// LandscapeIG filename. /// LandscapeIG filename.
std::string LandscapeIG; std::string LandscapeIG;
/// New Sky system : gives name of the sky sheet per season. If present, this bypass the SkyDay & SkyNight fields // New Sky system : gives name of the sky sheet per season. If present, this bypass the SkyDay & SkyNight fields
std::string SkySheet[EGSPD::CSeason::Invalid]; std::string SkySheet[EGSPD::CSeason::Invalid];
/// Light Cycle sheet
std::string LightCycle;
/// SkyDay filename. /// SkyDay filename.
std::string SkyDay; std::string SkyDay;

View file

@ -420,11 +420,6 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
progress.progress (0); progress.progress (0);
progress.pushCropedValues (0, 1.f/3.f); progress.pushCropedValues (0, 1.f/3.f);
{
H_AUTO(InitRZWorldLightCycle)
loadWorldLightCycle(CSheetId(LightCycle));
}
{ {
H_AUTO(InitRZWorldIndoor) H_AUTO(InitRZWorldIndoor)
if (!ClientCfg.Light) if (!ClientCfg.Light)

View file

@ -587,7 +587,7 @@ void CContinentManager::reloadWeather()
WeatherManager.init(); WeatherManager.init();
// Load description of light cycles for each season. // Load description of light cycles for each season.
loadWorldLightCycle(CSheetId::Unknown); //FIXME loadWorldLightCycle();
// Load global weather function parameters // Load global weather function parameters
loadWeatherFunctionParams(); loadWeatherFunctionParams();

View file

@ -411,7 +411,7 @@ static void initWeather()
{ {
WeatherManager.init(); WeatherManager.init();
// Load description of light cycles for each season. // Load description of light cycles for each season.
loadWorldLightCycle(CSheetId::Unknown); // FIXME loadWorldLightCycle();
// Load global weather function parameters // Load global weather function parameters
loadWeatherFunctionParams(); loadWeatherFunctionParams();
// //

View file

@ -442,7 +442,7 @@ class CAHReloadSeason: public IActionHandler
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
{ {
// reload all parameters for weather // reload all parameters for weather
loadWorldLightCycle(CSheetId::Unknown); // FIXME loadWorldLightCycle();
loadWeatherFunctionParams(); loadWeatherFunctionParams();
WeatherManager.init(); WeatherManager.init();
ContinentMngr.reloadWeather(); ContinentMngr.reloadWeather();

View file

@ -87,14 +87,9 @@ void buildLightCycleDesc(CLightCycleDesc &dest,EGSPD::CSeason::TSeason season)
else dest.DuskRatio = 0.5f; else dest.DuskRatio = 0.5f;
} }
void loadWorldLightCycle(CSheetId lightCycle) void loadWorldLightCycle()
{ {
nldebug("Load light cycle '%s'", lightCycle.toString().c_str()); CEntitySheet *sheet = SheetMngr.get(CSheetId("ryzom.light_cycle"));
if (lightCycle == CSheetId::Unknown)
lightCycle = CSheetId("ryzom.light_cycle");
CEntitySheet *sheet = SheetMngr.get(lightCycle);
nlassert(sheet); nlassert(sheet);
if (sheet->type() != CEntitySheet::LIGHT_CYCLE) if (sheet->type() != CEntitySheet::LIGHT_CYCLE)
{ {

View file

@ -20,7 +20,6 @@
#define CL_WORLD_LIGHT_CYCLE_H #define CL_WORLD_LIGHT_CYCLE_H
#include <nel/misc/sheet_id.h>
#include "game_share/season.h" #include "game_share/season.h"
struct CLightCycleDesc; struct CLightCycleDesc;
@ -48,7 +47,7 @@ extern EGSPD::CSeason::TSeason StartupSeason;
extern CWeatherFunctionParamsSheet *WeatherFunctionParams; extern CWeatherFunctionParamsSheet *WeatherFunctionParams;
// load the world light cycle from a sheet // load the world light cycle from a sheet
void loadWorldLightCycle(NLMISC::CSheetId lightCycleSheet); void loadWorldLightCycle();
// load the weather function params // load the weather function params
void loadWeatherFunctionParams(); void loadWeatherFunctionParams();