From: Rudolf Polzer Date: Sat, 3 Mar 2012 12:12:35 +0000 (+0100) Subject: move playermodel LOD slider to effects X-Git-Tag: xonotic-v0.6.0~21 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=64f2ed65bcde8543cbeaa56ccaf8c794aa4cd344;p=xonotic%2Fxonotic-data.pk3dir.git move playermodel LOD slider to effects --- diff --git a/qcsrc/common/util.qc b/qcsrc/common/util.qc index 23354397a..582777647 100644 --- a/qcsrc/common/util.qc +++ b/qcsrc/common/util.qc @@ -196,6 +196,9 @@ float median(float a, float b, float c) // works for up to 10 decimals! string ftos_decimals(float number, float decimals) { + // inhibit stupid negative zero + if(number == 0) + number = 0; // we have sprintf... return sprintf("%.*f", decimals, number); } @@ -909,6 +912,8 @@ float almost_in_bounds(float a, float b, float c) { float eps; eps = (max(a, -a) + max(c, -c)) * 0.001; + if(a > c) + eps = -eps; return b == median(a - eps, b, c + eps); } diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c index c6ca713f5..25b0fcb19 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup_model.c @@ -6,7 +6,7 @@ CLASS(XonoticModelDialog) EXTENDS(XonoticDialog) ATTRIB(XonoticModelDialog, title, string, _("Model settings")) ATTRIB(XonoticModelDialog, color, vector, SKINCOLOR_DIALOG_MODEL) ATTRIB(XonoticModelDialog, intendedWidth, float, 0.5) - ATTRIB(XonoticModelDialog, rows, float, 8) + ATTRIB(XonoticModelDialog, rows, float, 7) ATTRIB(XonoticModelDialog, columns, float, 3) ENDCLASS(XonoticModelDialog) #endif @@ -36,9 +36,6 @@ void XonoticModelDialog_fill(entity me) e.addValue(e, ZCTX(_("GIBS^Lots")), "0"); e.configureXonoticTextSliderValues(e); setDependent(e, "cl_gentle", 0, 0); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Playermodel LOD:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(0, 4, 0.1, "cl_playerdetailreduction")); me.TR(me); #ifdef ALLOW_FORCEMODELS me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Force models:"))); diff --git a/qcsrc/menu/xonotic/dialog_settings_effects.c b/qcsrc/menu/xonotic/dialog_settings_effects.c index 8ef2e9d63..1e315dc98 100644 --- a/qcsrc/menu/xonotic/dialog_settings_effects.c +++ b/qcsrc/menu/xonotic/dialog_settings_effects.c @@ -58,6 +58,9 @@ void XonoticEffectsSettingsTab_fill(entity me) e.addValue(e, ZCTX(_("DET^Best")), "2"); e.addValue(e, ZCTX(_("DET^Insane")), "1"); e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Playermodel LOD:"))); + me.TD(me, 1, 2, e = makeXonoticSlider(4, 0, -0.1, "cl_playerdetailreduction")); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Texture resolution:"))); me.TD(me, 1, 2, e = makeXonoticPicmipSlider()); @@ -70,7 +73,6 @@ void XonoticEffectsSettingsTab_fill(entity me) e.addValue(e, ZCTX(_("RES^Good")), "-1"); e.addValue(e, ZCTX(_("RES^Best")), "-2"); e.configureXonoticTextSliderValues(e); - me.TR(me); me.TR(me); { // detect texture compression method