Xonotic
slider_particles.qc
Go to the documentation of this file.
1 #include "slider_particles.qh"
2 
4 {
5  entity me;
7  me.configureXonoticParticlesSlider(me);
8  return me;
9 }
11 {
12  me.configureXonoticTextSlider(me, "cl_particles_quality",
13  _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance"));
14  if(cvar("developer") > 0) { me.addValue(me, ZCTX(_("PART^OMG")), "0.25 250 0"); }
15  me.addValue(me, ZCTX(_("PARTQUAL^Low")), "0.5 500 0");
16  me.addValue(me, ZCTX(_("PARTQUAL^Medium")), "0.75 750 0");
17  me.addValue(me, ZCTX(_("PARTQUAL^Normal")), "1.0 1000 1");
18  me.addValue(me, ZCTX(_("PARTQUAL^High")), "1.5 1500 1");
19  me.addValue(me, ZCTX(_("PARTQUAL^Ultra")), "2.0 2000 2");
20  if(cvar("developer") > 0) { me.addValue(me, ZCTX(_("PARTQUAL^Ultimate")), "3.0 3000 2"); }
21  me.configureXonoticTextSliderValues(me);
22 }
24 {
25  me.setValueFromIdentifier_noAnim(me, sprintf("%s %s %s",
26  cvar_string("cl_particles_quality"),
27  cvar_string("r_drawparticles_drawdistance"),
28  cvar_string("cl_damageeffect")
29  ));
30 }
32 {
33  if(me.value >= 0 || me.value < me.nValues)
34  {
35  tokenize_console(me.getIdentifier(me));
36  cvar_set("cl_particles_quality", argv(0));
37  cvar_set("r_drawparticles_drawdistance", argv(1));
38  cvar_set("cl_damageeffect", argv(2));
39  }
40 }
void XonoticParticlesSlider_loadCvars(entity me)
#define NEW(cname,...)
Definition: oo.qh:105
void XonoticParticlesSlider_configureXonoticParticlesSlider(entity me)
entity() spawn
entity makeXonoticParticlesSlider()
#define ZCTX(s)
Definition: i18n.qh:68
#define tokenize_console
Definition: dpextensions.qh:24
void XonoticParticlesSlider_saveCvars(entity me)