cl_decals 1
cl_decals_models 0
cl_decals_fadetime 4
-cl_particles_quality 1
+cl_particles 1
+cl_particles_quality 1.0
cl_damageeffect 1
cl_spawn_point_particles 1
-cl_playerdetailreduction 4
+cl_playerdetailreduction 4.0
gl_flashblend 0
gl_picmip -1
mod_q3bsp_nolightmaps 0
hud_powerup 0
r_depthfirst 2
r_drawdecals_drawdistance 500
-r_drawparticles_drawdistance 2000
+r_drawparticles_drawdistance 1500
r_glsl_deluxemapping 1
r_glsl_offsetmapping 0
r_glsl_offsetmapping_reliefmapping 0
cl_decals 1
cl_decals_models 0
cl_decals_fadetime 2
+cl_particles 1
cl_particles_quality 0.4
cl_damageeffect 0
cl_spawn_point_particles 0
cl_decals 1
cl_decals_models 0
cl_decals_fadetime 2
-cl_particles_quality 1
+cl_particles 1
+cl_particles_quality 0.8
cl_damageeffect 0
cl_spawn_point_particles 0
cl_playerdetailreduction 4
hud_powerup 0
r_depthfirst 0
r_drawdecals_drawdistance 300
-r_drawparticles_drawdistance 1000
+r_drawparticles_drawdistance 750
r_glsl_deluxemapping 0
r_glsl_offsetmapping 0
r_glsl_offsetmapping_reliefmapping 0
cl_decals 1
cl_decals_models 0
cl_decals_fadetime 2
-cl_particles_quality 1
+cl_particles 1
+cl_particles_quality 1.0
cl_damageeffect 1
cl_spawn_point_particles 1
cl_playerdetailreduction 4
cl_decals 0
cl_decals_models 0
cl_decals_fadetime 2
+cl_particles 1
cl_particles_quality 0.4
cl_damageeffect 0
cl_spawn_point_particles 0
cl_decals 1
cl_decals_models 1
cl_decals_fadetime 10
-cl_particles_quality 1
+cl_particles 1
+cl_particles_quality 1.0
cl_damageeffect 2
cl_spawn_point_particles 1
cl_playerdetailreduction 0
hud_powerup 0.5
r_depthfirst 2
r_drawdecals_drawdistance 500
-r_drawparticles_drawdistance 2000
+r_drawparticles_drawdistance 3000
r_glsl_deluxemapping 1
r_glsl_offsetmapping 1
r_glsl_offsetmapping_reliefmapping 1
cl_decals 1
cl_decals_models 0
cl_decals_fadetime 10
-cl_particles_quality 1
-cl_damageeffect 1
+cl_particles 1
+cl_particles_quality 1.0
+cl_damageeffect 2
cl_spawn_point_particles 1
-cl_playerdetailreduction 2
+cl_playerdetailreduction 0
gl_flashblend 0
gl_picmip -1
mod_q3bsp_nolightmaps 0
// after exec'ing them all from your autoexec.cfg
// Set the cvars for each gun
-seta cl_swapattacks_laser 0
+seta cl_swapattacks_blaster 0
seta cl_swapattacks_shotgun 0
-seta cl_swapattacks_uzi 0
-seta cl_swapattacks_grenadelauncher 0
+seta cl_swapattacks_machinegun 0
+seta cl_swapattacks_mortar 0
seta cl_swapattacks_minelayer 0
seta cl_swapattacks_electro 0
seta cl_swapattacks_crylink 0
-seta cl_swapattacks_nex 0
+seta cl_swapattacks_vortex 0
seta cl_swapattacks_hagar 0
-seta cl_swapattacks_rocketlauncher 0
+seta cl_swapattacks_devastator 0
seta cl_swapattacks_porto 0
-seta cl_swapattacks_minstanex 0
+seta cl_swapattacks_vaporizer 0
seta cl_swapattacks_hook 0
seta cl_swapattacks_hlac 0
seta cl_swapattacks_tuba 0
seta cl_swapattacks_fireball 0
seta cl_swapattacks_seeker 0
+// Backwards compatibility with 0.7.0
+alias cl_swapattacks_laser $cl_swapattacks_blaster
+alias cl_swapattacks_rocketlauncher $cl_swapattacks_devastator
+alias cl_swapattacks_uzi $cl_swapattacks_machinegun
+alias cl_swapattacks_grenadelauncher $cl_swapattacks_mortar
+alias cl_swapattacks_minstanex $cl_swapattacks_vaporizer
+alias cl_swapattacks_nex $cl_swapattacks_vortex
+
// This part of the code is necessary to keep us firing when we switch weapons while holding a fire button pressed
// Also updates the keys before firing, so we don't have to switch to another weapon and back to apply the changes
set fire_last 0
alias firing_swap_apply "firing_decision_${$1}"
alias firing_swap "firing_swap_apply cl_swapattacks_$1; set firing_lastweapon cl_swapattacks_$1; firing_switch"
-// Not correct, but prevents firing from braking after executing the script until switching weapons
+// Not correct, but prevents firing from breaking after executing the script until switching weapons
alias +fire +attack
alias -fire -attack
alias +fire2 +attack2
--- /dev/null
+Plane,g_arc_simple
\ No newline at end of file
--- /dev/null
+Plane,g_campingrifle_simple
\ No newline at end of file
--- /dev/null
+Plane,g_fireball_simple
\ No newline at end of file
--- /dev/null
+Plane,g_hlac_simple
\ No newline at end of file
--- /dev/null
+Plane,g_hookgun_simple
\ No newline at end of file
--- /dev/null
+Plane,g_laser_simple
\ No newline at end of file
--- /dev/null
+Plane,g_minelayer_simple
\ No newline at end of file
--- /dev/null
+Plane,g_minstanex_simple
\ No newline at end of file
--- /dev/null
+Plane,g_porto_simple
\ No newline at end of file
--- /dev/null
+Plane,g_seeker_simple
\ No newline at end of file
--- /dev/null
+Plane,g_tuba_simple
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+baseline=20
+
+sprite()
+{
+ name=$1
+ text=$(echo $2) # Handle newlines
+ color=$3
+
+ echo $name
+
+ # Text
+ exec {FD}< <(convert \
+ -size 185x120 \
+ -background transparent \
+ -fill "#$color" \
+ -font BigNoodleTitling \
+ -interline-spacing -15 \
+ -gravity south \
+ label:"$text" \
+ -trim \
+ png:-)
+ itext=$FD
+
+ # Rectangles
+
+ # Thick
+ xa1=34
+ xa2=$((xa1+185-1))
+ ya1=174
+ ya2=$((ya1+37-1))
+
+ # Thin
+ xb1=34
+ xb2=$((xb1+185-1))
+ yb1=224
+ yb2=$((yb1+15-1))
+
+ exec {FD}< <(convert \
+ -size 256x256 \
+ -background transparent \
+ -fill "#$color" \
+ xc:none \
+ -draw "rectangle $xa1,$ya1 $xa2,$ya2" \
+ -draw "rectangle $xb1,$yb1 $xb2,$yb2" \
+ png:-)
+ irects=$FD
+
+ # Join
+
+ composite \
+ -gravity south \
+ -geometry -2+$((82+$baseline)) \
+ -compress RLE \
+ png:fd:$itext png:fd:$irects g_${name}_simple.tga
+}
+
+# grep '* color' ../../qcsrc/common/weapons/w_*.qc | awk '{ print $1 " \t" $4 " " $5 " " $6 }'
+# def h(r,g,b): return '#{:02x}{:02x}{:02x}'.format(int(round(r*255)),int(round(g*255)),int(round(b*255)))
+sprite arc "Arc" ffffff # White
+sprite laser "Blaster" ff8080 # Vivid Tangerine
+sprite crylink "Crylink" ff80ff # Blush Pink
+sprite rl "Devastator" ffff00 # Yellow
+sprite electro "Electro" 0080ff # Azure Radiance
+sprite fireball "Fireball" ff8000 # Flush Orange
+sprite hagar "Hagar" ffff80 # Dolly
+sprite hlac "HLAC" 00ff00 # Green
+sprite hookgun "Grappling\nHook" 008000 # Japanese Laurel
+sprite uzi "Machine\nGun" ffff00 # Yellow
+sprite minelayer "Mine\nLayer" bfff00 # Lime
+sprite gl "Mortar" ff0000 # Red
+sprite porto "Port-O-Launch" 808080 # Gray
+sprite campingrifle "Rifle" 80ff00 # Chartreuse
+sprite seeker "T.A.G.\nSeeker" 80ff00 # Chartreuse
+#sprite shockwave "Shockwave" 804000 # Cinnamon
+sprite shotgun "Shotgun" 804000 # Cinnamon
+sprite tuba "Tuba" 00ff00 # Green
+sprite minstanex "Vaporizer" 80ffff # Anakiwa
+sprite nex "Vortex" 80ffff # Anakiwa
#include "xonotic/dialog_hudpanel_centerprint.c"
#include "xonotic/dialog_hudpanel_buffs.c"
#include "xonotic/slider_picmip.c"
+#include "xonotic/slider_particles.c"
if(cvar("developer"))
me.TD(me, 1, 5 / n, e = makeXonoticCommandButton(ZCTX(_("PRE^Ultimate")), '0.5 0 0', "exec effects-ultimate.cfg", 0));
- me.TR(me);
- me.TR(me);
+ me.gotoRC(me, 1.25, 0);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Geometry detail:")));
me.TD(me, 1, 2, e = makeXonoticTextSlider("r_subdivisions_tolerance"));
e.addValue(e, ZCTX(_("DET^Lowest")), "16");
e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Player detail:")));
- me.TD(me, 1, 2, e = makeXonoticSlider(4, 0, -0.1, "cl_playerdetailreduction"));
+ me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_playerdetailreduction"));
+ e.addValue(e, ZCTX(_("PDET^Low")), "4");
+ e.addValue(e, ZCTX(_("PDET^Medium")), "3");
+ e.addValue(e, ZCTX(_("PDET^Normal")), "2");
+ e.addValue(e, ZCTX(_("PDET^Good")), "1");
+ e.addValue(e, ZCTX(_("PDET^Best")), "0");
+ e.configureXonoticTextSliderValues(e);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Texture resolution:")));
setDependent(e, "r_showsurfaces", 0, 0);
setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Particles quality:")));
- me.TD(me, 1, 2, e = makeXonoticSlider(0.2, 1.0, 0.1, "cl_particles_quality"));
- me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Particles distance:")));
- me.TD(me, 1, 2, e = makeXonoticSlider(500, 2000, 100, "r_drawparticles_drawdistance"));
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "cl_decals", _("Decals")));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "cl_decals_models", _("Decals on models")));
+ setDependent(e, "cl_decals", 1, 1);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Damage effects:")));
- me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_damageeffect"));
- e.addValue(e, ZCTX(_("DMGPRTCLS^Disabled")), "0");
- e.addValue(e, ZCTX(_("DMGPRTCLS^Skeletal")), "1");
- e.addValue(e, ZCTX(_("DMGPRTCLS^All")), "2");
- e.configureXonoticTextSliderValues(e);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Distance:")));
+ setDependent(e, "cl_decals", 1, 1);
+ me.TD(me, 1, 2, e = makeXonoticSlider(200, 500, 20, "r_drawdecals_drawdistance"));
+ setDependent(e, "cl_decals", 1, 1);
me.TR(me);
- me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_spawn_point_particles", _("Particle effects for spawnpoints")));
- makeMulti(e, "cl_spawn_event_particles");
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Time:")));
+ setDependent(e, "cl_decals", 1, 1);
+ me.TD(me, 1, 2, e = makeXonoticSlider(1, 20, 1, "cl_decals_fadetime"));
+ setDependent(e, "cl_decals", 1, 1);
- me.gotoRC(me, 2, 3.2); me.setFirstColumn(me, me.currentColumn);
+ me.gotoRC(me, 1.25, 3.2); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "r_coronas", "0", _("No dynamic lighting")));
me.TR(me);
me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "gl_flashblend", string_null, _("Fake corona lighting")));
me.TD(me, 1, 2, s);
me.TR(me);
me.TR(me);
- me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "cl_decals", _("Decals")));
- me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "cl_decals_models", _("Decals on models")));
- setDependent(e, "cl_decals", 1, 1);
+ me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "cl_particles", _("Particles")));
+ me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "cl_spawn_point_particles", _("Spawnpoint effects")));
+ makeMulti(e, "cl_spawn_event_particles");
+ setDependent(e, "cl_particles", 1, 1);
me.TR(me);
+ me.TDempty(me, 0.2);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Quality:")));
+ setDependent(e, "cl_particles", 1, 1);
+ me.TD(me, 1, 2, e = makeXonoticParticlesSlider());
+ setDependent(e, "cl_particles", 1, 1);
+ me.TR(me);
me.TDempty(me, 0.2);
me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Distance:")));
setDependent(e, "cl_decals", 1, 1);
me.TD(me, 1, 2, e = makeXonoticSlider(200, 500, 20, "r_drawdecals_drawdistance"));
setDependent(e, "cl_decals", 1, 1);
- me.TR(me);
+ me.TR(me);
me.TDempty(me, 0.2);
- me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Time:")));
- setDependent(e, "cl_decals", 1, 1);
- me.TD(me, 1, 2, e = makeXonoticSlider(1, 20, 1, "cl_decals_fadetime"));
- setDependent(e, "cl_decals", 1, 1);
+ me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Time:")));
+ setDependent(e, "cl_decals", 1, 1);
+ me.TD(me, 1, 2, e = makeXonoticSlider(1, 20, 1, "cl_decals_fadetime"));
+ setDependent(e, "cl_decals", 1, 1);
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, makeXonoticCommandButton(_("Apply immediately"), '0 0 0', "vid_restart", COMMANDBUTTON_APPLY));
--- /dev/null
+#ifdef INTERFACE
+CLASS(XonoticParticlesSlider) EXTENDS(XonoticTextSlider)
+ METHOD(XonoticParticlesSlider, configureXonoticParticlesSlider, void(entity))
+ METHOD(XonoticParticlesSlider, loadCvars, void(entity))
+ METHOD(XonoticParticlesSlider, saveCvars, void(entity))
+ENDCLASS(XonoticParticlesSlider)
+entity makeXonoticParticlesSlider();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeXonoticParticlesSlider()
+{
+ entity me;
+ me = spawnXonoticParticlesSlider();
+ me.configureXonoticParticlesSlider(me);
+ return me;
+}
+void XonoticParticlesSlider_configureXonoticParticlesSlider(entity me)
+{
+ me.configureXonoticTextSlider(me, "cl_particles_quality");
+ if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^OMG")), "0.4 250 0"); }
+ me.addValue(me, ZCTX(_("PART^Low")), "0.4 500 0");
+ me.addValue(me, ZCTX(_("PART^Medium")), "0.8 750 0");
+ me.addValue(me, ZCTX(_("PART^Normal")), "1.0 1000 1");
+ me.addValue(me, ZCTX(_("PART^High")), "1.0 1500 1");
+ me.addValue(me, ZCTX(_("PART^Ultra")), "1.0 2000 2");
+ if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^Ultimate")), "1.0 3000 2"); }
+ me.configureXonoticTextSliderValues(me);
+}
+void XonoticParticlesSlider_loadCvars(entity me)
+{
+ me.setValueFromIdentifier(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));
+ }
+}
+#endif
void player_anim (void)
{
float deadbits = (self.anim_state & (ANIMSTATE_DEAD1 | ANIMSTATE_DEAD2));
- if(self.deadflag && !deadbits)
- if(random() < 0.5)
- deadbits = ANIMSTATE_DEAD1;
- else
- deadbits = ANIMSTATE_DEAD2;
+ if(self.deadflag) {
+ if (!deadbits) {
+ // Decide on which death animation to use.
+ if(random() < 0.5)
+ deadbits = ANIMSTATE_DEAD1;
+ else
+ deadbits = ANIMSTATE_DEAD2;
+ }
+ } else {
+ // Clear a previous death animation.
+ deadbits = 0;
+ }
float animbits = deadbits;
if(self.frozen)
animbits |= ANIMSTATE_FROZEN;
////////// WEAPONS //////////
+g_arc_simple // arc
+{
+ deformVertexes autosprite
+ cull none
+ nopicmip
+
+ {
+ map models/weapons/g_arc_simple
+ blendfunc blend
+
+ }
+}
+
g_crylink_simple // crylink
{
deformVertexes autosprite
}
}
-g_nex_simple // nex
+g_nex_simple // vortex
{
deformVertexes autosprite
cull none
}
}
-g_rl_simple // rocket launcher
+g_rl_simple // devastator
{
deformVertexes autosprite
cull none
}
}
-g_uzi_simple // machine gun
-{
- deformVertexes autosprite
- cull none
- nopicmip
-
- {
- map models/weapons/g_uzi_simple
- blendfunc blend
-
- }
-}
-
g_campingrifle_simple // sniper rifle
{
deformVertexes autosprite
}
}
-g_laser_simple // laser
+g_laser_simple // blaster
{
deformVertexes autosprite
cull none
}
}
-g_minstanex_simple // minstanex
+g_minstanex_simple // vaporizer
{
deformVertexes autosprite
cull none
blendfunc blend
}
-}
\ No newline at end of file
+}
-alias weapon_laser "impulse 230"
+alias weapon_blaster "impulse 230"
alias weapon_shotgun "impulse 231"
-alias weapon_uzi "impulse 232"
-alias weapon_grenadelauncher "impulse 233"
+alias weapon_machinegun "impulse 232"
+alias weapon_mortar "impulse 233"
alias weapon_minelayer "impulse 234"
alias weapon_electro "impulse 235"
alias weapon_crylink "impulse 236"
-alias weapon_nex "impulse 237"
+alias weapon_vortex "impulse 237"
alias weapon_hagar "impulse 238"
-alias weapon_rocketlauncher "impulse 239"
+alias weapon_devastator "impulse 239"
alias weapon_porto "impulse 240"
-alias weapon_minstanex "impulse 241"
+alias weapon_vaporizer "impulse 241"
alias weapon_hook "impulse 242"
alias weapon_hlac "impulse 243"
alias weapon_tuba "impulse 244"
alias weapon_rifle "impulse 245"
alias weapon_fireball "impulse 246"
alias weapon_seeker "impulse 247"
+alias weapon_shockwave "impulse 248"
+alias weapon_arc "impulse 249"
+
+// Backwards compatibility with 0.7.0
+alias weapon_laser "weapon_blaster"
+alias weapon_uzi "weapon_machinegun"
+alias weapon_grenadelauncher "weapon_grenadelauncher"
+alias weapon_nex "weapon_vortex"
+alias weapon_rocketlauncher "weapon_devestator"
+alias weapon_minstanex "weapon_vaporizer"