Xonotic
slider_particles.qc File Reference
+ Include dependency graph for slider_particles.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

entity makeXonoticParticlesSlider ()
 
void XonoticParticlesSlider_configureXonoticParticlesSlider (entity me)
 
void XonoticParticlesSlider_loadCvars (entity me)
 
void XonoticParticlesSlider_saveCvars (entity me)
 

Function Documentation

◆ makeXonoticParticlesSlider()

entity makeXonoticParticlesSlider ( )

Definition at line 3 of file slider_particles.qc.

References entity(), and NEW.

4 {
5  entity me;
7  me.configureXonoticParticlesSlider(me);
8  return me;
9 }
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
+ Here is the call graph for this function:

◆ XonoticParticlesSlider_configureXonoticParticlesSlider()

void XonoticParticlesSlider_configureXonoticParticlesSlider ( entity  me)

Definition at line 10 of file slider_particles.qc.

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 }
#define ZCTX(s)
Definition: i18n.qh:68

◆ XonoticParticlesSlider_loadCvars()

void XonoticParticlesSlider_loadCvars ( entity  me)

Definition at line 23 of file slider_particles.qc.

References cvar_string().

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 }
+ Here is the call graph for this function:

◆ XonoticParticlesSlider_saveCvars()

void XonoticParticlesSlider_saveCvars ( entity  me)

Definition at line 31 of file slider_particles.qc.

References argv(), cvar_set(), and tokenize_console.

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 }
#define tokenize_console
Definition: dpextensions.qh:24
+ Here is the call graph for this function: