]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/modified_default_cvars 299/head
authorterencehill <piuntn@gmail.com>
Sun, 3 Apr 2016 12:22:12 +0000 (14:22 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 3 Apr 2016 12:22:12 +0000 (14:22 +0200)
defaultXonotic.cfg
hud_luma.cfg
hud_luminos.cfg
hud_luminos_minimal.cfg
hud_luminos_minimal_xhair.cfg
hud_luminos_old.cfg
hud_nexuiz.cfg
qcsrc/common/util.qh
qcsrc/lib/string.qh
qcsrc/menu/xonotic/checkbox.qc
qcsrc/menu/xonotic/slider.qc

index 7ed41440f88ebbc56a349ee841a6194804cda7fe..607b55567a2a75696a27c7376f8ba2eaff7e856c 100644 (file)
@@ -772,6 +772,17 @@ seta g_waypointsprite_turrets 1 "disable turret waypoints"
 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
index 226af4c1bf237ff596b4128c9621d410d1e8df5f..066ebfbf4bc04d6ee94baa5bfdf0a39700cb6daf 100644 (file)
@@ -15,7 +15,7 @@ seta hud_dock_color "0 0 0"
 seta hud_dock_color_team "1"
 seta hud_dock_alpha "1"
 
-seta hud_progressbar_alpha "0.600000"
+seta hud_progressbar_alpha "0.6"
 seta hud_progressbar_strength_color "1 0.39 0"
 seta hud_progressbar_superweapons_color "0.77 0.67 0"
 seta hud_progressbar_shield_color "0.36 1 0.07"
@@ -46,7 +46,7 @@ seta hud_panel_weapons_bg_border ""
 seta hud_panel_weapons_bg_padding "0"
 seta hud_panel_weapons_accuracy "0"
 seta hud_panel_weapons_label "1"
-seta hud_panel_weapons_label_scale "0.300000"
+seta hud_panel_weapons_label_scale "0.3"
 seta hud_panel_weapons_complainbubble "1"
 seta hud_panel_weapons_complainbubble_padding "0"
 seta hud_panel_weapons_complainbubble_time "0"
@@ -65,8 +65,8 @@ seta hud_panel_weapons_timeout_fadefgmin "0.4"
 seta hud_panel_weapons_timeout_speed_in "0.25"
 seta hud_panel_weapons_timeout_speed_out "0.75"
 seta hud_panel_weapons_onlyowned "1"
-seta hud_panel_weapons_noncurrent_alpha "0.800000"
-seta hud_panel_weapons_noncurrent_scale "0.900000"
+seta hud_panel_weapons_noncurrent_alpha "0.8"
+seta hud_panel_weapons_noncurrent_scale "0.9"
 
 seta hud_panel_ammo "1"
 seta hud_panel_ammo_pos "0.315000 0.865000"
@@ -78,8 +78,8 @@ seta hud_panel_ammo_bg_alpha ""
 seta hud_panel_ammo_bg_border ""
 seta hud_panel_ammo_bg_padding "4"
 seta hud_panel_ammo_onlycurrent "0"
-seta hud_panel_ammo_noncurrent_alpha "0.600000"
-seta hud_panel_ammo_noncurrent_scale "0.400000"
+seta hud_panel_ammo_noncurrent_alpha "0.6"
+seta hud_panel_ammo_noncurrent_scale "0.4"
 seta hud_panel_ammo_iconalign "0"
 seta hud_panel_ammo_progressbar "0"
 seta hud_panel_ammo_progressbar_name "progressbar"
@@ -192,7 +192,7 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding ""
-seta hud_panel_vote_alreadyvoted_alpha "0.700000"
+seta hud_panel_vote_alreadyvoted_alpha "0.7"
 
 seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.370000 0.030000"
@@ -216,7 +216,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding "1"
-seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat "1"
@@ -258,7 +258,7 @@ seta hud_panel_physics_size "0.180000 0.080000"
 seta hud_panel_physics_bg "0"
 seta hud_panel_physics_bg_color ""
 seta hud_panel_physics_bg_color_team ""
-seta hud_panel_physics_bg_alpha "0.700000"
+seta hud_panel_physics_bg_alpha "0.7"
 seta hud_panel_physics_bg_border ""
 seta hud_panel_physics_bg_padding ""
 seta hud_panel_physics_speed_unit_show "1"
index 04902e07f8a64fee26a1dc990515730535a635e8..65a3c9539eefdb25fdf9c00a2e65b8b411bc3bb2 100644 (file)
@@ -15,7 +15,7 @@ seta hud_dock_color "0 0.449576 0.860796"
 seta hud_dock_color_team "1"
 seta hud_dock_alpha "1"
 
-seta hud_progressbar_alpha "0.500000"
+seta hud_progressbar_alpha "0.5"
 seta hud_progressbar_strength_color "0 0 0.6"
 seta hud_progressbar_superweapons_color "0.6 0.3 0"
 seta hud_progressbar_shield_color "0.6 0 0.6"
@@ -46,7 +46,7 @@ seta hud_panel_weapons_bg_border ""
 seta hud_panel_weapons_bg_padding "4"
 seta hud_panel_weapons_accuracy "1"
 seta hud_panel_weapons_label "1"
-seta hud_panel_weapons_label_scale "0.500000"
+seta hud_panel_weapons_label_scale "0.5"
 seta hud_panel_weapons_complainbubble "1"
 seta hud_panel_weapons_complainbubble_padding "-1"
 seta hud_panel_weapons_complainbubble_time "0"
@@ -78,7 +78,7 @@ seta hud_panel_ammo_bg_alpha ""
 seta hud_panel_ammo_bg_border ""
 seta hud_panel_ammo_bg_padding ""
 seta hud_panel_ammo_onlycurrent "0"
-seta hud_panel_ammo_noncurrent_alpha "0.700000"
+seta hud_panel_ammo_noncurrent_alpha "0.7"
 seta hud_panel_ammo_noncurrent_scale "1"
 seta hud_panel_ammo_iconalign "0"
 seta hud_panel_ammo_progressbar "0"
@@ -150,10 +150,10 @@ seta hud_panel_radar_size "0.200000 0.240000"
 seta hud_panel_radar_bg "border_small_radar"
 seta hud_panel_radar_bg_color ""
 seta hud_panel_radar_bg_color_team ""
-seta hud_panel_radar_bg_alpha "0.800000"
+seta hud_panel_radar_bg_alpha "0.8"
 seta hud_panel_radar_bg_border ""
 seta hud_panel_radar_bg_padding "-1"
-seta hud_panel_radar_foreground_alpha "0.800000"
+seta hud_panel_radar_foreground_alpha "0.8"
 seta hud_panel_radar_rotation "0"
 seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
@@ -192,7 +192,7 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding ""
-seta hud_panel_vote_alreadyvoted_alpha "0.500000"
+seta hud_panel_vote_alreadyvoted_alpha "0.5"
 
 seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.410000 0"
@@ -216,7 +216,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
-seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat "1"
index 76214f49035e9abdeae7d30ca50966f2c213f5af..bf3dba6b6ee33664951ca79600b249b4e4686b35 100644 (file)
@@ -12,10 +12,10 @@ seta hud_panel_fg_alpha "1"
 
 seta hud_dock "0"
 seta hud_dock_color "0 0.449576 0.860796"
-seta hud_dock_color_team "0.700000"
+seta hud_dock_color_team "0.7"
 seta hud_dock_alpha "1"
 
-seta hud_progressbar_alpha "0.500000"
+seta hud_progressbar_alpha "0.5"
 seta hud_progressbar_strength_color "0 0 0.6"
 seta hud_progressbar_superweapons_color "0.6 0.3 0"
 seta hud_progressbar_shield_color "0.6 0 0.6"
@@ -150,10 +150,10 @@ seta hud_panel_radar_size "0.190000 0.250000"
 seta hud_panel_radar_bg "border_radar"
 seta hud_panel_radar_bg_color ""
 seta hud_panel_radar_bg_color_team ""
-seta hud_panel_radar_bg_alpha "0.500000"
+seta hud_panel_radar_bg_alpha "0.5"
 seta hud_panel_radar_bg_border "0"
 seta hud_panel_radar_bg_padding "0"
-seta hud_panel_radar_foreground_alpha "0.500000"
+seta hud_panel_radar_foreground_alpha "0.5"
 seta hud_panel_radar_rotation "0"
 seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
@@ -192,7 +192,7 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding ""
-seta hud_panel_vote_alreadyvoted_alpha "0.800000"
+seta hud_panel_vote_alreadyvoted_alpha "0.8"
 
 seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.560000 0"
@@ -216,7 +216,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
-seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat "1"
index 722a316fd0c031ff37f58f42fda32f6d9a0d8b21..baef5ba5c9ee54f9368c74578b6b6924c234fe73 100644 (file)
@@ -12,7 +12,7 @@ seta hud_panel_fg_alpha "1"
 
 seta hud_dock "0"
 seta hud_dock_color "0 0.449576 0.860796"
-seta hud_dock_color_team "0.700000"
+seta hud_dock_color_team "0.7"
 seta hud_dock_alpha "1"
 
 seta hud_progressbar_alpha "0.3"
@@ -106,7 +106,7 @@ seta hud_panel_healtharmor_size "0.070000 0.240000"
 seta hud_panel_healtharmor_bg "border_healtharmor"
 seta hud_panel_healtharmor_bg_color "0.464391 0.464391 0.464391"
 seta hud_panel_healtharmor_bg_color_team ""
-seta hud_panel_healtharmor_bg_alpha "0.600000"
+seta hud_panel_healtharmor_bg_alpha "0.6"
 seta hud_panel_healtharmor_bg_border "-1"
 seta hud_panel_healtharmor_bg_padding "0"
 seta hud_panel_healtharmor_flip "0"
@@ -150,10 +150,10 @@ seta hud_panel_radar_size "0.190000 0.250000"
 seta hud_panel_radar_bg "border_radar"
 seta hud_panel_radar_bg_color ""
 seta hud_panel_radar_bg_color_team ""
-seta hud_panel_radar_bg_alpha "0.500000"
+seta hud_panel_radar_bg_alpha "0.5"
 seta hud_panel_radar_bg_border "0"
 seta hud_panel_radar_bg_padding "0"
-seta hud_panel_radar_foreground_alpha "0.500000"
+seta hud_panel_radar_foreground_alpha "0.5"
 seta hud_panel_radar_rotation "0"
 seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
@@ -192,7 +192,7 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding ""
-seta hud_panel_vote_alreadyvoted_alpha "0.800000"
+seta hud_panel_vote_alreadyvoted_alpha "0.8"
 
 seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.560000 0"
@@ -216,7 +216,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
-seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat "1"
index 3138471bb798a603f2345e00d80046267efa3b00..b4b6b694ee80161a1f0326e0fc6774373e8368ae 100644 (file)
@@ -12,10 +12,10 @@ seta hud_panel_fg_alpha "1"
 
 seta hud_dock "dock"
 seta hud_dock_color "0 0.1875 0.40625"
-seta hud_dock_color_team "0.700000"
+seta hud_dock_color_team "0.7"
 seta hud_dock_alpha "1"
 
-seta hud_progressbar_alpha "0.500000"
+seta hud_progressbar_alpha "0.5"
 seta hud_progressbar_strength_color "0 0 0.6"
 seta hud_progressbar_superweapons_color "0.6 0.3 0"
 seta hud_progressbar_shield_color "0.6 0 0.6"
@@ -153,7 +153,7 @@ seta hud_panel_radar_bg_color_team ""
 seta hud_panel_radar_bg_alpha ""
 seta hud_panel_radar_bg_border ""
 seta hud_panel_radar_bg_padding "-3"
-seta hud_panel_radar_foreground_alpha "0.800000"
+seta hud_panel_radar_foreground_alpha "0.8"
 seta hud_panel_radar_rotation "0"
 seta hud_panel_radar_zoommode "0"
 seta hud_panel_radar_scale "4096"
@@ -192,7 +192,7 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding ""
-seta hud_panel_vote_alreadyvoted_alpha "0.800000"
+seta hud_panel_vote_alreadyvoted_alpha "0.8"
 
 seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.040000 0.270000"
@@ -216,7 +216,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
-seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat "1"
@@ -364,7 +364,7 @@ seta hud_panel_itemstime_progressbar "1"
 seta hud_panel_itemstime_progressbar_name "progressbar"
 seta hud_panel_itemstime_progressbar_reduced "1"
 seta hud_panel_itemstime_text "1"
-seta hud_panel_itemstime_ratio "3.500000"
+seta hud_panel_itemstime_ratio "3.5"
 seta hud_panel_itemstime_dynamicsize "1"
 
 seta hud_panel_quickmenu "1"
index 791653f270a920c139feeb8d5a8170269c449a76..ccf74a48eac0cd0b48bd40f7d2f62392614795f3 100644 (file)
@@ -5,15 +5,15 @@ seta hud_skin "old"
 seta hud_panel_bg "border_default"
 seta hud_panel_bg_color "0.299327 1 0.81275"
 seta hud_panel_bg_color_team "0"
-seta hud_panel_bg_alpha "0.700000"
+seta hud_panel_bg_alpha "0.7"
 seta hud_panel_bg_border "8"
 seta hud_panel_bg_padding "0"
 seta hud_panel_fg_alpha "1"
 
 seta hud_dock "dock"
 seta hud_dock_color "0 0.697965 0.418232"
-seta hud_dock_color_team "0.700000"
-seta hud_dock_alpha "0.700000"
+seta hud_dock_color_team "0.7"
+seta hud_dock_alpha "0.7"
 
 seta hud_progressbar_alpha "0.5"
 seta hud_progressbar_strength_color "0 0 0.6"
@@ -150,7 +150,7 @@ seta hud_panel_radar_size "0.200000 0.260000"
 seta hud_panel_radar_bg "border_radar"
 seta hud_panel_radar_bg_color ""
 seta hud_panel_radar_bg_color_team ""
-seta hud_panel_radar_bg_alpha "0.500000"
+seta hud_panel_radar_bg_alpha "0.5"
 seta hud_panel_radar_bg_border "0"
 seta hud_panel_radar_bg_padding "0"
 seta hud_panel_radar_foreground_alpha "1"
@@ -192,7 +192,7 @@ seta hud_panel_vote_bg_color_team ""
 seta hud_panel_vote_bg_alpha ""
 seta hud_panel_vote_bg_border ""
 seta hud_panel_vote_bg_padding "-3"
-seta hud_panel_vote_alreadyvoted_alpha "0.750000"
+seta hud_panel_vote_alreadyvoted_alpha "0.75"
 
 seta hud_panel_modicons "1"
 seta hud_panel_modicons_pos "0.010000 0.910000"
@@ -216,7 +216,7 @@ seta hud_panel_pressedkeys_bg_color_team ""
 seta hud_panel_pressedkeys_bg_alpha ""
 seta hud_panel_pressedkeys_bg_border ""
 seta hud_panel_pressedkeys_bg_padding ""
-seta hud_panel_pressedkeys_aspect "1.600000"
+seta hud_panel_pressedkeys_aspect "1.6"
 seta hud_panel_pressedkeys_attack "0"
 
 seta hud_panel_chat "1"
index 7bc8675335958fef698d3c06692b63a0eb7edb86..da6574c0a8c34800513cc2b3f7e9e6b3126ed252 100644 (file)
@@ -27,8 +27,8 @@ void depthfirst(entity start, .entity up, .entity downleft, .entity right, void(
 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);
 
index 47a8175cac598554b3f2965a7dfc83db5429d2f5..384188091d0c4b0c92917bacafd3253707be3fe6 100644 (file)
@@ -281,16 +281,24 @@ void buf_save(float buf, string pFilename)
 
 /**
  * converts a number to a string with the indicated number of decimals
- * works for up to 10 decimals!
  */
 string ftos_decimals(float number, int decimals)
 {
        // inhibit stupid negative zero
        if (number == 0) number = 0;
-       // we have sprintf...
        return sprintf("%.*f", decimals, number);
 }
 
+/**
+ * converts a number to a string with the minimum number of decimals
+ */
+string ftos_mindecimals(float number)
+{
+       // inhibit stupid negative zero
+       if (number == 0) number = 0;
+       return sprintf("%.7g", number);
+}
+
 int vercmp_recursive(string v1, string v2)
 {
        int dot1 = strstrofs(v1, ".", 0);
index 21743b9a1506801ea9a4a86bce1843c706d85447..6015e48bad45369c9b350e4eefe38d29202f2e8a 100644 (file)
@@ -77,9 +77,9 @@ void XonoticCheckBox_saveCvars(entity me)
                return;
 
        if(me.checked)
-               cvar_set(me.cvarName, ftos(me.yesValue));
+               cvar_set(me.cvarName, ftos_mindecimals(me.yesValue));
        else
-               cvar_set(me.cvarName, ftos(me.noValue));
+               cvar_set(me.cvarName, ftos_mindecimals(me.noValue));
 
        CheckSendCvars(me, me.cvarName);
 }
index fc4228cf98b0503b55f013a15df217d1909978f5..c8e057a641416aa922a9760b6cbaafa3072b881e 100644 (file)
@@ -58,7 +58,7 @@ void XonoticSlider_saveCvars(entity me)
        if (!me.cvarName)
                return;
 
-       cvar_set(me.cvarName, ftos(me.value));
+       cvar_set(me.cvarName, ftos_mindecimals(me.value));
 
        CheckSendCvars(me, me.cvarName);
 }