From: Mario Date: Sat, 31 Aug 2024 09:08:21 +0000 (+0000) Subject: Clean up the use of developer in the menu and remove other weird settings X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f9acbbd5c91c9c327a07c2f49eb09df66fd24600;p=xonotic%2Fxonotic-data.pk3dir.git Clean up the use of developer in the menu and remove other weird settings --- diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index 8bff8c4c6..4d2d6d450 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -79,17 +79,6 @@ void m_init() CheckEngineExtensions(); - // list all game dirs (TEST) - if (cvar("developer") > 0) - { - for (int i = 0; ; ++i) - { - string s = getgamedirinfo(i, GETGAMEDIRINFO_NAME); - if (!s) break; - LOG_TRACE(s, ": ", getgamedirinfo(i, GETGAMEDIRINFO_DESCRIPTION)); - } - } - registercvar("_menu_cmd_closemenu_available", "0", 0); cvar_set("_menu_cmd_closemenu_available", "1"); diff --git a/qcsrc/menu/xonotic/_mod.inc b/qcsrc/menu/xonotic/_mod.inc index 524c65915..96287299d 100644 --- a/qcsrc/menu/xonotic/_mod.inc +++ b/qcsrc/menu/xonotic/_mod.inc @@ -112,7 +112,6 @@ #include #include #include -#include #include #include #include diff --git a/qcsrc/menu/xonotic/_mod.qh b/qcsrc/menu/xonotic/_mod.qh index b4fe3d836..c8941bbd6 100644 --- a/qcsrc/menu/xonotic/_mod.qh +++ b/qcsrc/menu/xonotic/_mod.qh @@ -112,7 +112,6 @@ #include #include #include -#include #include #include #include diff --git a/qcsrc/menu/xonotic/dialog_settings_audio.qc b/qcsrc/menu/xonotic/dialog_settings_audio.qc index c2e3482f5..7f911c103 100644 --- a/qcsrc/menu/xonotic/dialog_settings_audio.qc +++ b/qcsrc/menu/xonotic/dialog_settings_audio.qc @@ -182,10 +182,6 @@ void XonoticAudioSettingsTab_fill(entity me) e.addValue(e, _("Always"), "1"); e.configureXonoticTextSliderValues(e); e.sendCvars = true; - me.TR(me); - me.TR(me); - if(cvar("developer") > 0) - me.TD(me, 1, 3, makeXonoticCheckBox(0, "showsound", _("Debug info about sounds"))); me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, audioApplyButton); diff --git a/qcsrc/menu/xonotic/dialog_settings_effects.qc b/qcsrc/menu/xonotic/dialog_settings_effects.qc index 1a08a42bd..372ed9121 100644 --- a/qcsrc/menu/xonotic/dialog_settings_effects.qc +++ b/qcsrc/menu/xonotic/dialog_settings_effects.qc @@ -39,12 +39,7 @@ void XonoticEffectsSettingsTab_fill(entity me) float n; me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Quality preset:"))); - n = 5 + 2 * boolean(cvar("developer") > 0); - if(cvar("developer") > 0) - { - me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^OMG!")), '1 0 1', "exec effects-omg.cfg", 0)); - e.applyButton = effectsApplyButton; - } + n = 5; me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^Low")), '0 0 0', "exec effects-low.cfg", 0)); e.applyButton = effectsApplyButton; me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^Medium")), '0 0 0', "exec effects-med.cfg", 0)); @@ -55,11 +50,6 @@ void XonoticEffectsSettingsTab_fill(entity me) e.applyButton = effectsApplyButton; me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^Ultra")), '0 0 0', "exec effects-ultra.cfg", 0)); e.applyButton = effectsApplyButton; - if(cvar("developer") > 0) - { - me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^Ultimate")), '0.5 0 0', "exec effects-ultimate.cfg", 0)); - e.applyButton = effectsApplyButton; - } me.gotoRC(me, 1.25, 0); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Geometry detail:"))); @@ -87,9 +77,7 @@ void XonoticEffectsSettingsTab_fill(entity me) me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Texture resolution:"))); setDependent(e, "r_showsurfaces", 0, 0); me.TD(me, 1, 2, e = makeXonoticPicmipSlider()); - if(cvar("developer") > 0) - e.addValue(e, ZCTX(_("RES^Leet")), "1337"); - e.addValue(e, ZCTX(_("RES^Lowest")), "3"); + e.addValue(e, ZCTX(_("RES^Lowest")), "1337"); e.addValue(e, ZCTX(_("RES^Very low")), "2"); e.addValue(e, ZCTX(_("RES^Low")), "1"); e.addValue(e, ZCTX(_("RES^Normal")), "0"); @@ -127,11 +115,6 @@ void XonoticEffectsSettingsTab_fill(entity me) me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeXonoticCheckBoxEx_T(1, 0, "r_sky", _("Show sky"), _("Disable sky for performance and visibility"))); - if(cvar("developer") > 0) - { - me.TD(me, 1, 1, e = makeXonoticCheckBoxEx_T(3, 0, "r_showsurfaces", _("Show surfaces"), - _("Disable textures completely for very slow hardware. This gives a huge performance boost, but looks very ugly."))); - } me.TR(me); me.TD(me, 1, 1, e = makeXonoticCheckBox_T(1, "mod_q3bsp_nolightmaps", _("Use lightmaps"), _("Use high resolution lightmaps, which will look pretty but use up some extra video memory"))); diff --git a/qcsrc/menu/xonotic/dialog_settings_misc.qc b/qcsrc/menu/xonotic/dialog_settings_misc.qc index 375510e2a..24c4c7ce4 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc.qc +++ b/qcsrc/menu/xonotic/dialog_settings_misc.qc @@ -41,13 +41,6 @@ void XonoticMiscSettingsTab_fill(entity me) me.TR(me); if(cvar_type("crypto_aeslevel") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeXonoticCheckBoxEx(2, 1, "crypto_aeslevel", _("Use encryption (AES) when available"))); - if(cvar("developer") > 0) - { - me.TR(me); - me.TR(me); - me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Local latency:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(0, 1000, 25, "cl_netlocalping")); - } me.TR(me); me.TR(me); me.TD(me, 1, 3.25, e = makeXonoticHeaderLabel(_("HTTP downloads"))); @@ -122,9 +115,6 @@ void XonoticMiscSettingsTab_fill(entity me) _("Show current date and time of day, useful on screenshots"))); makeMulti(e, "showdate"); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "developer", _("Enable developer mode"))); - e.applyButton = miscApplyButton; - me.TR(me); me.TDempty(me, 0.5); me.TD(me, 1, 2, e = makeXonoticButton_T(_("Advanced settings..."), '0 0 0', diff --git a/qcsrc/menu/xonotic/dialog_settings_video.qc b/qcsrc/menu/xonotic/dialog_settings_video.qc index 39d952826..ff236bc69 100644 --- a/qcsrc/menu/xonotic/dialog_settings_video.qc +++ b/qcsrc/menu/xonotic/dialog_settings_video.qc @@ -158,20 +158,6 @@ void XonoticVideoSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_gl20", _("Use OpenGL 2.0 shaders (GLSL)"))); e.applyButton = videoApplyButton; } - if(cvar("developer") > 0) - { - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "v_flipped", _("Flip view horizontally"), - _("Poor man's left handed mode"))); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_psycho", _("Psycho coloring (easter egg)"))); - if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE) - setDependent(e, "vid_gl20", 1, 1); - me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_trippy", _("Trippy vertices (easter egg)"))); - if(cvar_type("vid_gl20") & CVAR_TYPEFLAG_ENGINE) - setDependent(e, "vid_gl20", 1, 1); - } me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns, videoApplyButton); diff --git a/qcsrc/menu/xonotic/slider_particles.qc b/qcsrc/menu/xonotic/slider_particles.qc deleted file mode 100644 index 27a723689..000000000 --- a/qcsrc/menu/xonotic/slider_particles.qc +++ /dev/null @@ -1,40 +0,0 @@ -#include "slider_particles.qh" - -entity makeXonoticParticlesSlider() -{ - entity me; - me = NEW(XonoticParticlesSlider); - me.configureXonoticParticlesSlider(me); - return me; -} -void XonoticParticlesSlider_configureXonoticParticlesSlider(entity me) -{ - me.configureXonoticTextSlider(me, "cl_particles_quality", - _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance")); - if(cvar("developer") > 0) { me.addValue(me, ZCTX(_("PART^OMG")), "0.25 250 0"); } - me.addValue(me, ZCTX(_("PARTQUAL^Low")), "0.5 500 0"); - me.addValue(me, ZCTX(_("PARTQUAL^Medium")), "0.75 750 0"); - me.addValue(me, ZCTX(_("PARTQUAL^Normal")), "1.0 1000 1"); - me.addValue(me, ZCTX(_("PARTQUAL^High")), "1.5 1500 1"); - me.addValue(me, ZCTX(_("PARTQUAL^Ultra")), "2.0 2000 2"); - if(cvar("developer") > 0) { me.addValue(me, ZCTX(_("PARTQUAL^Ultimate")), "3.0 3000 2"); } - me.configureXonoticTextSliderValues(me); -} -void XonoticParticlesSlider_loadCvars(entity me) -{ - me.setValueFromIdentifier_noAnim(me, sprintf("%s %s %s", - cvar_string("cl_particles_quality"), - cvar_string("r_drawparticles_drawdistance"), - cvar_string("cl_damageeffect") - )); -} -void XonoticParticlesSlider_saveCvars(entity me) -{ - if(me.value >= 0 || me.value < me.nValues) - { - tokenize_console(me.getIdentifier(me)); - cvar_set("cl_particles_quality", argv(0)); - cvar_set("r_drawparticles_drawdistance", argv(1)); - cvar_set("cl_damageeffect", argv(2)); - } -} diff --git a/qcsrc/menu/xonotic/slider_particles.qh b/qcsrc/menu/xonotic/slider_particles.qh deleted file mode 100644 index 47c1bff24..000000000 --- a/qcsrc/menu/xonotic/slider_particles.qh +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include "textslider.qh" -CLASS(XonoticParticlesSlider, XonoticTextSlider) - METHOD(XonoticParticlesSlider, configureXonoticParticlesSlider, void(entity)); - METHOD(XonoticParticlesSlider, loadCvars, void(entity)); - METHOD(XonoticParticlesSlider, saveCvars, void(entity)); -ENDCLASS(XonoticParticlesSlider) -entity makeXonoticParticlesSlider();