]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'terencehill/modified_default_cvars' into 'master'
authorMario <zacjardine@y7mail.com>
Tue, 5 Apr 2016 22:42:58 +0000 (22:42 +0000)
committerMario <zacjardine@y7mail.com>
Tue, 5 Apr 2016 22:42:58 +0000 (22:42 +0000)
Fix for menu modifying default cvar values (float numbers)

Remove trailing 0s before saving float numbers into cvars in the menu.  Reason: with a fresh config a few cvars were considered modified because on menu start sliders rewrite the current cvar values adding trailing 0s

These are the cvars that were added in config.cfg on menu start after having pressed save setting in the first run dialog:
```
seta "crosshair_alpha" "0.800000"
seta "crosshair_dot_size" "0.600000"
seta "crosshair_ring_alpha" "0.200000"
"crosshair_size" "0.400000"
seta "hud_panel_centerprint_fade_out" "0.500000"
```

See merge request !299

1  2 
defaultXonotic.cfg
qcsrc/common/util.qh

diff --combined defaultXonotic.cfg
index 9020afb29ef8a57b325985dbe3128e20351cdf4a,607b55567a2a75696a27c7376f8ba2eaff7e856c..e1531205ec0ced6ebe6f48f9b599e680eaaf7fb1
@@@ -306,7 -306,6 +306,7 @@@ seta sv_precacheitems 
  set sv_spectator_speed_multiplier 1.5
  seta sv_spectate 1 "if set to 1, new clients are allowed to spectate or observe the game, if set to 0 joining clients spawn as players immediately (no spectating)"
  seta sv_defaultcharacter 0 "master switch, if set to 1 the further configuration for replacing all player models, skins and colors is taken from the sv_defaultplayermodel, sv_defaultplayerskin and sv_defaultplayercolors variables"
 +seta sv_defaultcharacterskin 0 "if set to 1 the further configuration for replacing all skins is taken from the sv_defaultplayerskin variables"
  seta sv_defaultplayermodel "models/player/erebus.iqm" "default model selection, only works if sv_defaultcharacter is set to 1; you may append a :<skinnumber> suffix to model names; you can specify multiple, separated by space, and a random one will be chosen"
  seta sv_defaultplayerskin 0 "each model has 1 or more skins (combination of model and skin = character), set which skin of the model you wish the default character to have, only works if sv_defaultcharacter is set to 1; can be overriden by :<skinnumber> suffix in sv_defaultplayermodel"
  seta sv_defaultplayermodel_red ""     "\"\" means see sv_defaultplayermodel"
@@@ -773,6 -772,17 +773,17 @@@ seta g_waypointsprite_turrets 1 "disabl
  seta g_waypointsprite_turrets_maxdist 5000 "max distace for turret sprites"
  seta g_waypointsprite_tactical 1 "tactical overlay on turrets when in a vehicle"
  
+ seta cl_damagetext "0" "Draw damage dealt where you hit the enemy"
+ seta cl_damagetext_format "-{total}" "How to format the damage text. {health}, {armor}, {total}"
+ seta cl_damagetext_color "1 1 0" "Damage text color"
+ seta cl_damagetext_color_per_weapon "0" "Damage text uses weapon color"
+ seta cl_damagetext_size "8" "Damage text font size"
+ seta cl_damagetext_alpha_start "1" "Damage text initial alpha"
+ seta cl_damagetext_alpha_lifetime "3" "Damage text lifetime in seconds"
+ seta cl_damagetext_velocity "0 0 20" "Damage text move direction"
+ seta cl_damagetext_offset "0 -40 0" "Damage text offset"
+ seta cl_damagetext_accumulate_range "30" "Damage text spawned within this range is accumulated"
  set sv_itemstime 1 "enable networking of left time until respawn for items such as mega health and large armor"
  
  // so it can be stuffcmd-ed still
diff --combined qcsrc/common/util.qh
index ed11b04b74b4774891daedc7f5eaaf0276daa0d6,da6574c0a8c34800513cc2b3f7e9e6b3126ed252..de2c32513b064f3c9e73dc116a7b75eea3b4e865
@@@ -27,8 -27,8 +27,8 @@@ void depthfirst(entity start, .entity u
  float median(float a, float b, float c);
  
  // converts a number to a string with the indicated number of decimals
- // works for up to 10 decimals!
  string ftos_decimals(float number, float decimals);
+ string ftos_mindecimals(float number);
  
  bool fexists(string f);
  
@@@ -273,6 -273,10 +273,6 @@@ string CCR(string input)
  vector animfixfps(entity e, vector a, vector b);
  #endif
  
 -#ifdef SVQC
 -void dedicated_print(string input);
 -#endif
 -
  #ifndef MENUQC
  const float CNT_NORMAL = 1;
  const float CNT_GAMESTART = 2;