Changed: Set max map scale from client cfg

--HG--
branch : develop
This commit is contained in:
Nimetu 2018-04-30 15:14:04 +03:00
parent b1f1e081a7
commit aa612e3799
5 changed files with 18 additions and 5 deletions

View file

@ -315,6 +315,10 @@ CameraSpeedMin = 2.0;
CameraSpeedMax = 100.0; CameraSpeedMax = 100.0;
CameraResetSpeed = 10.0; // Speed in radian/s CameraResetSpeed = 10.0; // Speed in radian/s
// Default values for map
MaxMapScale = 2.0f;
R2EDMaxMapScale = 8.0f;
////////////////// //////////////////
// SOUND CONFIG // // SOUND CONFIG //
////////////////// //////////////////

View file

@ -316,8 +316,6 @@
selection_axis_color = "0 0 0 127" selection_axis_color = "0 0 0 127"
compass="ui:interface:compass" compass="ui:interface:compass"
scale_max="2"
scale_max_r2="8"
/> />
<!-- border around the map --> <!-- border around the map -->
@ -409,7 +407,6 @@
player_pos_tex="player_pos.tga" player_pos_tex="player_pos.tga"
scale_max="2"
/> />
<!-- border around the map --> <!-- border around the map -->

View file

@ -603,6 +603,9 @@ CClientConfig::CClientConfig()
CameraSpeedMax = 1.0f; CameraSpeedMax = 1.0f;
CameraResetSpeed = 2.0f; CameraResetSpeed = 2.0f;
MaxMapScale = 2.0f;
R2EDMaxMapScale = 8.0f;
// VERBOSES // VERBOSES
VerboseVP = false; VerboseVP = false;
VerboseAnimUser = false; VerboseAnimUser = false;
@ -1466,6 +1469,9 @@ void CClientConfig::setValues()
READ_FLOAT_FV(CameraDistance) READ_FLOAT_FV(CameraDistance)
} }
// Default values for CGroupMap
READ_FLOAT_FV(MaxMapScale);
READ_FLOAT_FV(R2EDMaxMapScale);
///////////// /////////////
// SHADOWS // // SHADOWS //

View file

@ -591,6 +591,10 @@ struct CClientConfig
float CameraSpeedMax; float CameraSpeedMax;
float CameraResetSpeed; float CameraResetSpeed;
// Default values for CGroupMap
float MaxMapScale;
float R2EDMaxMapScale;
////////////// //////////////
// VERBOSES // // VERBOSES //
bool VerboseVP; bool VerboseVP;

View file

@ -711,9 +711,11 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
} }
// //
_ScaleMax = ClientCfg.MaxMapScale;
ptr = (char*) xmlGetProp( cur, (xmlChar*)"scale_max" ); ptr = (char*) xmlGetProp( cur, (xmlChar*)"scale_max" );
if (ptr) fromString((const char *) ptr, _ScaleMax); if (ptr) fromString((const char *) ptr, _ScaleMax);
// //
_ScaleMaxR2 = ClientCfg.R2EDMaxMapScale;
ptr = (char*) xmlGetProp( cur, (xmlChar*)"scale_max_r2" ); ptr = (char*) xmlGetProp( cur, (xmlChar*)"scale_max_r2" );
if (ptr) fromString((const char *) ptr, _ScaleMaxR2); if (ptr) fromString((const char *) ptr, _ScaleMaxR2);
// //