From aa612e379937bbce970511f4dd475d2793b3b1bd Mon Sep 17 00:00:00 2001 From: Nimetu Date: Mon, 30 Apr 2018 15:14:04 +0300 Subject: [PATCH] Changed: Set max map scale from client cfg --HG-- branch : develop --- code/ryzom/client/client_default.cfg | 4 ++++ code/ryzom/client/data/gamedev/interfaces_v3/map.xml | 7 ++----- code/ryzom/client/src/client_cfg.cpp | 6 ++++++ code/ryzom/client/src/client_cfg.h | 4 ++++ code/ryzom/client/src/interface_v3/group_map.cpp | 2 ++ 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/client_default.cfg b/code/ryzom/client/client_default.cfg index c128ac28a..0f917d2f4 100644 --- a/code/ryzom/client/client_default.cfg +++ b/code/ryzom/client/client_default.cfg @@ -315,6 +315,10 @@ CameraSpeedMin = 2.0; CameraSpeedMax = 100.0; CameraResetSpeed = 10.0; // Speed in radian/s +// Default values for map +MaxMapScale = 2.0f; +R2EDMaxMapScale = 8.0f; + ////////////////// // SOUND CONFIG // ////////////////// diff --git a/code/ryzom/client/data/gamedev/interfaces_v3/map.xml b/code/ryzom/client/data/gamedev/interfaces_v3/map.xml index dcc2515ea..66d948e03 100644 --- a/code/ryzom/client/data/gamedev/interfaces_v3/map.xml +++ b/code/ryzom/client/data/gamedev/interfaces_v3/map.xml @@ -316,9 +316,7 @@ selection_axis_color = "0 0 0 127" compass="ui:interface:compass" - scale_max="2" - scale_max_r2="8" - /> + /> @@ -409,8 +407,7 @@ player_pos_tex="player_pos.tga" - scale_max="2" - /> + /> diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 4e644ff14..881f99b16 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -603,6 +603,9 @@ CClientConfig::CClientConfig() CameraSpeedMax = 1.0f; CameraResetSpeed = 2.0f; + MaxMapScale = 2.0f; + R2EDMaxMapScale = 8.0f; + // VERBOSES VerboseVP = false; VerboseAnimUser = false; @@ -1466,6 +1469,9 @@ void CClientConfig::setValues() READ_FLOAT_FV(CameraDistance) } + // Default values for CGroupMap + READ_FLOAT_FV(MaxMapScale); + READ_FLOAT_FV(R2EDMaxMapScale); ///////////// // SHADOWS // diff --git a/code/ryzom/client/src/client_cfg.h b/code/ryzom/client/src/client_cfg.h index 4d4d746e0..aa9eba8c2 100644 --- a/code/ryzom/client/src/client_cfg.h +++ b/code/ryzom/client/src/client_cfg.h @@ -591,6 +591,10 @@ struct CClientConfig float CameraSpeedMax; float CameraResetSpeed; + // Default values for CGroupMap + float MaxMapScale; + float R2EDMaxMapScale; + ////////////// // VERBOSES // bool VerboseVP; diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 929e35f71..6160db539 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -711,9 +711,11 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) } // + _ScaleMax = ClientCfg.MaxMapScale; ptr = (char*) xmlGetProp( cur, (xmlChar*)"scale_max" ); if (ptr) fromString((const char *) ptr, _ScaleMax); // + _ScaleMaxR2 = ClientCfg.R2EDMaxMapScale; ptr = (char*) xmlGetProp( cur, (xmlChar*)"scale_max_r2" ); if (ptr) fromString((const char *) ptr, _ScaleMaxR2); //