From a4f5c03293b498576f8e270aa6e3b6369ca1e55e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:22:18 +0100 Subject: [PATCH 1/4] Fix choppy sky animation --- code/ryzom/client/src/main_loop_debug.cpp | 3 +++ code/ryzom/client/src/sky.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/main_loop_debug.cpp b/code/ryzom/client/src/main_loop_debug.cpp index 19ea38414..992325c54 100644 --- a/code/ryzom/client/src/main_loop_debug.cpp +++ b/code/ryzom/client/src/main_loop_debug.cpp @@ -371,6 +371,9 @@ void displayDebug() // Current GameCycle TextContext->printfAt(1.f, line, "Ms per Cycle : %d", NetMngr.getMsPerTick()); line += lineStep; + // Smoothed Client Date + TextContext->printfAt(1.f, line, "Smoothed Client Date : %u %f", SmoothedClientDate.Day, SmoothedClientDate.Hour); + line += lineStep; // Packet Loss TextContext->printfAt(1.f, line, "Packet Loss : %.1f %%", NetMngr.getMeanPacketLoss()*100.0f); line += lineStep; diff --git a/code/ryzom/client/src/sky.cpp b/code/ryzom/client/src/sky.cpp index d5a9216ce..855ab3387 100644 --- a/code/ryzom/client/src/sky.cpp +++ b/code/ryzom/client/src/sky.cpp @@ -235,7 +235,7 @@ uint CSky::setup(const CClientDate &date, const CClientDate &animationDate, floa // animate objects if (_PlayListManager) { - double globalDate = ((double) _NumHourInDay * date.Day + (double) date.Hour) / _NumHourInDay; + double globalDate = (double)date.Hour / (double)_NumHourInDay; //nlinfo("global date = %f", (float) globalDate); _PlayListManager->animate(_AnimLengthInSeconds * globalDate); } From 661bb29406fbc82a74b97bf04de867720895f744 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:22:18 +0100 Subject: [PATCH 2/4] Add sky batch script --- code/nel/tools/build_gamedata/sky_dev.bat | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 code/nel/tools/build_gamedata/sky_dev.bat diff --git a/code/nel/tools/build_gamedata/sky_dev.bat b/code/nel/tools/build_gamedata/sky_dev.bat new file mode 100644 index 000000000..590400640 --- /dev/null +++ b/code/nel/tools/build_gamedata/sky_dev.bat @@ -0,0 +1,11 @@ +title Ryzom Core: 1_export.py (LEVELDESIGN) +1_export.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: 2_build.py (LEVELDESIGN) +2_build.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: 3_install.py (LEVELDESIGN) +3_install.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +title Ryzom Core: b1_client_dev.py (LEVELDESIGN) +b1_client_dev.py +title Ryzom Core: b2_shard_data.py (LEVELDESIGN) +b2_shard_data.py +title Ryzom Core: Ready From f7ad6e1a942846e35833441742eff15d59a2f6af Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:22:19 +0100 Subject: [PATCH 3/4] Allow different light cycle for different continents [breaks packed sheets] --- code/ryzom/client/src/client_sheets/continent_sheet.cpp | 5 +++++ code/ryzom/client/src/client_sheets/continent_sheet.h | 5 ++++- code/ryzom/client/src/continent.cpp | 5 +++++ code/ryzom/client/src/continent_manager.cpp | 2 +- code/ryzom/client/src/init_main_loop.cpp | 2 +- .../client/src/interface_v3/action_handler_debug.cpp | 2 +- code/ryzom/client/src/weather.cpp | 9 +++++++-- code/ryzom/client/src/weather.h | 3 ++- 8 files changed, 26 insertions(+), 7 deletions(-) diff --git a/code/ryzom/client/src/client_sheets/continent_sheet.cpp b/code/ryzom/client/src/client_sheets/continent_sheet.cpp index 17868866c..6cd46b15c 100644 --- a/code/ryzom/client/src/client_sheets/continent_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/continent_sheet.cpp @@ -300,6 +300,9 @@ void CContinentParameters::build(const NLGEORGES::UFormElm &item) if(readSeasontype() != CEntitySheet::LIGHT_CYCLE) { diff --git a/code/ryzom/client/src/weather.h b/code/ryzom/client/src/weather.h index 954b7f2c8..02a70a5a2 100644 --- a/code/ryzom/client/src/weather.h +++ b/code/ryzom/client/src/weather.h @@ -20,6 +20,7 @@ #define CL_WORLD_LIGHT_CYCLE_H +#include #include "game_share/season.h" struct CLightCycleDesc; @@ -47,7 +48,7 @@ extern EGSPD::CSeason::TSeason StartupSeason; extern CWeatherFunctionParamsSheet *WeatherFunctionParams; // load the world light cycle from a sheet -void loadWorldLightCycle(); +void loadWorldLightCycle(NLMISC::CSheetId lightCycleSheet); // load the weather function params void loadWeatherFunctionParams(); From d0b4aa56812427cb3b07fac4eae38190f45b80a0 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 12 Dec 2014 01:22:19 +0100 Subject: [PATCH 4/4] Adjust sky batch --- code/nel/tools/build_gamedata/sky_dev.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/build_gamedata/sky_dev.bat b/code/nel/tools/build_gamedata/sky_dev.bat index 590400640..ac80d591e 100644 --- a/code/nel/tools/build_gamedata/sky_dev.bat +++ b/code/nel/tools/build_gamedata/sky_dev.bat @@ -1,9 +1,9 @@ title Ryzom Core: 1_export.py (LEVELDESIGN) -1_export.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +1_export.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share title Ryzom Core: 2_build.py (LEVELDESIGN) -2_build.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +2_build.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share title Ryzom Core: 3_install.py (LEVELDESIGN) -3_install.py -ipj common/sky common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share +3_install.py -ipj common/sky common/sfx common/gamedev common/data_common common/data_shard common/leveldesign common/exedll common/cfg shard/data_shard shard/data_language shard/data_leveldesign shard/data_game_share title Ryzom Core: b1_client_dev.py (LEVELDESIGN) b1_client_dev.py title Ryzom Core: b2_shard_data.py (LEVELDESIGN)