// a polygon rendering system for trails
seta cl_polytrails 1 "enable polygon-based trail effect drawing (looks better but may impact performance)"
+seta cl_polytrails_teamcolor 0 "apply team and player colors to part of the polytrails"
// electro primary bolt
seta cl_polytrails_electro_bolt 1
-seta cl_polytrails_electro_bolt_rgb0 "0.75 0.75 1"
-seta cl_polytrails_electro_bolt_rgb1 "0.45 0.45 1"
-seta cl_polytrails_electro_bolt_rgb2 "0.1 0.1 0.75"
-seta cl_polytrails_electro_bolt_alpha0 1
-seta cl_polytrails_electro_bolt_alpha1 0.5
-seta cl_polytrails_electro_bolt_alpha2 0
-seta cl_polytrails_electro_bolt_thickness0 5
-seta cl_polytrails_electro_bolt_thickness1 5
-seta cl_polytrails_electro_bolt_thickness2 0
+seta cl_polytrails_electro_bolt_head_alpha 1
+seta cl_polytrails_electro_bolt_head_color "0.75 0.75 1"
+seta cl_polytrails_electro_bolt_head_thickness 5
+seta cl_polytrails_electro_bolt_body_alpha 0.5
+seta cl_polytrails_electro_bolt_body_color "0.45 0.45 1"
+seta cl_polytrails_electro_bolt_body_thickness 5
+seta cl_polytrails_electro_bolt_tail_alpha 0
+seta cl_polytrails_electro_bolt_tail_color "0.1 0.1 0.75"
+seta cl_polytrails_electro_bolt_tail_thickness 0
seta cl_polytrails_electro_bolt_lifetime 0.27
seta cl_polytrails_electro_bolt_segmentsize 10
seta cl_polytrails_electro_bolt_noise 5
// electro secondary orb
seta cl_polytrails_electro_orb 1
-seta cl_polytrails_electro_orb_rgb0 "0.8 0.8 1"
-seta cl_polytrails_electro_orb_rgb1 "0.5 0.5 1"
-seta cl_polytrails_electro_orb_rgb2 "0.1 0.1 0.7"
-seta cl_polytrails_electro_orb_alpha0 1
-seta cl_polytrails_electro_orb_alpha1 0.5
-seta cl_polytrails_electro_orb_alpha2 0
-seta cl_polytrails_electro_orb_thickness0 15
-seta cl_polytrails_electro_orb_thickness1 7
-seta cl_polytrails_electro_orb_thickness2 0
+seta cl_polytrails_electro_orb_head_alpha 1
+seta cl_polytrails_electro_orb_head_color "0.8 0.8 1"
+seta cl_polytrails_electro_orb_head_thickness 15
+seta cl_polytrails_electro_orb_body_alpha 0.5
+seta cl_polytrails_electro_orb_body_color "0.5 0.5 1"
+seta cl_polytrails_electro_orb_body_thickness 7
+seta cl_polytrails_electro_orb_tail_alpha 0
+seta cl_polytrails_electro_orb_tail_color "0.1 0.1 0.7"
+seta cl_polytrails_electro_orb_tail_thickness 0
seta cl_polytrails_electro_orb_lifetime 0.18
seta cl_polytrails_electro_orb_segmentsize 10
seta cl_polytrails_electro_orb_noise 10
// crylink bouncing projectile
seta cl_polytrails_crylink_bouncing 1
-seta cl_polytrails_crylink_bouncing_rgb0 "0.7 0 1"
-seta cl_polytrails_crylink_bouncing_rgb1 "0.5 0 1"
-seta cl_polytrails_crylink_bouncing_rgb2 "0.1 0 0.8"
-seta cl_polytrails_crylink_bouncing_alpha0 0.5
-seta cl_polytrails_crylink_bouncing_alpha1 0.2
-seta cl_polytrails_crylink_bouncing_alpha2 0
-seta cl_polytrails_crylink_bouncing_thickness0 5
-seta cl_polytrails_crylink_bouncing_thickness1 3
-seta cl_polytrails_crylink_bouncing_thickness2 3
+seta cl_polytrails_crylink_bouncing_head_alpha 0.5
+seta cl_polytrails_crylink_bouncing_head_color "0.7 0 1"
+seta cl_polytrails_crylink_bouncing_head_thickness 5
+seta cl_polytrails_crylink_bouncing_body_alpha 0.2
+seta cl_polytrails_crylink_bouncing_body_color "0.5 0 1"
+seta cl_polytrails_crylink_bouncing_body_thickness 3
+seta cl_polytrails_crylink_bouncing_tail_alpha 0
+seta cl_polytrails_crylink_bouncing_tail_color "0.1 0 0.8"
+seta cl_polytrails_crylink_bouncing_tail_thickness 13
seta cl_polytrails_crylink_bouncing_lifetime 0.15
seta cl_polytrails_crylink_bouncing_segmentsize 80
seta cl_polytrails_crylink_bouncing_noise 0
// crylink bolt projectiles
seta cl_polytrails_crylink_bolt 1
-seta cl_polytrails_crylink_bolt_rgb0 "0.7 0 1"
-seta cl_polytrails_crylink_bolt_rgb1 "0.5 0 1"
-seta cl_polytrails_crylink_bolt_rgb2 "0.1 0 0.8"
-seta cl_polytrails_crylink_bolt_alpha0 0.75
-seta cl_polytrails_crylink_bolt_alpha1 0.2
-seta cl_polytrails_crylink_bolt_alpha2 0
-seta cl_polytrails_crylink_bolt_thickness0 5
-seta cl_polytrails_crylink_bolt_thickness1 3
-seta cl_polytrails_crylink_bolt_thickness2 3
+seta cl_polytrails_crylink_bolt_head_alpha 0.75
+seta cl_polytrails_crylink_bolt_head_color "0.7 0 1"
+seta cl_polytrails_crylink_bolt_head_thickness 5
+seta cl_polytrails_crylink_bolt_body_alpha 0.2
+seta cl_polytrails_crylink_bolt_body_color "0.5 0 1"
+seta cl_polytrails_crylink_bolt_body_thickness 3
+seta cl_polytrails_crylink_bolt_tail_alpha 0
+seta cl_polytrails_crylink_bolt_tail_color "0.1 0 0.8"
+seta cl_polytrails_crylink_bolt_tail_thickness 3
seta cl_polytrails_crylink_bolt_lifetime 0.15
seta cl_polytrails_crylink_bolt_segmentsize 80
seta cl_polytrails_crylink_bolt_noise 0
#include <client/player_skeleton.qh>
#include <client/weapons/projectile.qh>
#include <common/animdecide.qh>
-#include <common/effects/all.inc>
#include <common/effects/all.qh>
#include <common/ent_cs.qh>
#include <common/gamemodes/_mod.qh>
#include <client/weapons/projectile.qh>
#include <common/checkextension.qh>
#include <common/deathtypes/all.qh>
-#include <common/effects/all.inc>
#include <common/effects/all.qh>
#include <common/effects/effect.qh>
#include <common/effects/qc/_mod.qh>
#pragma once
#include <common/constants.qh>
-#include <common/weapons/_all.qh>
bool autocvar_cl_db_saveasdump;
bool autocvar_cl_spawn_event_particles;
#include "polytrails.qh"
+#include <client/main.qh>
#include <lib/warpzone/common.qh>
#define POLYTRAIL_SEEK(_p, _rel) ((POLYTRAIL_BUFSIZE + (_p).polytrail_bufidx + (_rel)) % POLYTRAIL_BUFSIZE)
}
vector to = this.polytrail_bufpos[idx];
to += lerpvratio('0 0 0', this.polytrail_bufnoise[idx], rtime);
- vector rgb = lerpv3ratio(this.polytrail_rgb[0], this.polytrail_rgb[1], this.polytrail_rgb[2], rtime);
- float a = lerp3ratio(this.polytrail_alpha[0], this.polytrail_alpha[1], this.polytrail_alpha[2], rtime);
- int thickness = lerp3ratio(this.polytrail_thickness[0], this.polytrail_thickness[1], this.polytrail_thickness[2], rtime);
+ vector rgb = lerpv3ratio(this.polytrail_head_color, this.polytrail_body_color, this.polytrail_tail_color, rtime);
+ float a = lerp3ratio(this.polytrail_head_alpha, this.polytrail_body_alpha, this.polytrail_tail_alpha, rtime);
+ int thickness = lerp3ratio(this.polytrail_head_thickness, this.polytrail_body_thickness, this.polytrail_tail_thickness, rtime);
vector thickdir = normalize(cross(normalize(to - from), view_origin - from)) * (thickness / 2);
vector A = from + thickdir;
vector B = from - thickdir;
void Trail_recreate(entity this)
{
- PolyTrail t = NEW(PolyTrail, this.polytrail_follow);
+ PolyTrail t = NEW(PolyTrail);
+ t.polytrail_follow = this.polytrail_follow;
+ IL_PUSH(g_drawables, t);
t.polytrail_tex = this.polytrail_tex;
- t.polytrail_rgb[0] = this.polytrail_rgb[0];
- t.polytrail_rgb[1] = this.polytrail_rgb[1];
- t.polytrail_rgb[2] = this.polytrail_rgb[2];
- t.polytrail_alpha[0] = this.polytrail_alpha[0];
- t.polytrail_alpha[1] = this.polytrail_alpha[1];
- t.polytrail_alpha[2] = this.polytrail_alpha[2];
- t.polytrail_thickness[0] = this.polytrail_thickness[0];
- t.polytrail_thickness[1] = this.polytrail_thickness[1];
- t.polytrail_thickness[2] = this.polytrail_thickness[2];
+ t.polytrail_head_alpha = this.polytrail_head_alpha;
+ t.polytrail_head_color = this.polytrail_head_color;
+ t.polytrail_head_thickness = this.polytrail_head_thickness;
+ t.polytrail_body_alpha = this.polytrail_body_alpha;
+ t.polytrail_body_color = this.polytrail_body_color;
+ t.polytrail_body_thickness = this.polytrail_body_thickness;
+ t.polytrail_tail_alpha = this.polytrail_tail_alpha;
+ t.polytrail_tail_color = this.polytrail_tail_color;
+ t.polytrail_tail_thickness = this.polytrail_tail_thickness;
t.polytrail_lifetime = this.polytrail_lifetime;
t.polytrail_segmentsize = this.polytrail_segmentsize;
t.polytrail_noise = this.polytrail_noise;
this.polytrail_follow = NULL;
}
+
+void PolyTrail_Spawn(entity this, entity _follow)
+{
+ this.polytrail_follow = _follow;
+ IL_PUSH(g_drawables, this);
+
+ if(autocvar_cl_polytrails_teamcolor && _follow.colormap > 0)
+ {
+ vector teamcolor = colormapPaletteColor(_follow.colormap & 0x0F, true);
+ // keep original head color so it matches projectile
+ this.polytrail_body_color = teamcolor;
+ this.polytrail_tail_color = teamcolor;
+ }
+}
#pragma once
-#include <client/main.qh>
-
bool autocvar_cl_polytrails = true;
+bool autocvar_cl_polytrails_teamcolor = false;
CLASS(PolyTrail, Object)
ATTRIB(PolyTrail, polytrail_follow, entity, NULL);
ATTRIB(PolyTrail, polytrail_noise, float, 0);
ATTRIB(PolyTrail, polytrail_segmentsize, float, 10);
ATTRIB(PolyTrail, polytrail_noisefunc, string, "chaotic");
- ATTRIBARRAY(PolyTrail, polytrail_rgb, vector, 3);
- ATTRIBARRAY(PolyTrail, polytrail_alpha, float, 3);
- ATTRIBARRAY(PolyTrail, polytrail_thickness, float, 3);
+ ATTRIB(PolyTrail, polytrail_head_alpha, float, 1);
+ ATTRIB(PolyTrail, polytrail_head_color, vector, '1 0 0');
+ ATTRIB(PolyTrail, polytrail_head_thickness, float, 10);
+ ATTRIB(PolyTrail, polytrail_body_alpha, float, 0.5);
+ ATTRIB(PolyTrail, polytrail_body_color, vector, '0 1 0');
+ ATTRIB(PolyTrail, polytrail_body_thickness, float, 5);
+ ATTRIB(PolyTrail, polytrail_tail_alpha, float, 0);
+ ATTRIB(PolyTrail, polytrail_tail_color, vector, '0 0 1');
+ ATTRIB(PolyTrail, polytrail_tail_thickness, float, 0);
/**
* Increase as necessary if the buffer is overflowing
void Trail_draw(entity this);
void Trail_recreate(entity this);
+ void PolyTrail_Spawn(entity this, entity _follow);
ATTRIB(PolyTrail, draw, void(entity this), Trail_draw);
- CONSTRUCTOR(PolyTrail, entity _follow) {
- CONSTRUCT(PolyTrail);
- this.polytrail_follow = _follow;
- IL_PUSH(g_drawables, this);
- }
ENDCLASS(PolyTrail)
#include <common/constants.qh>
#include <common/effects/all.qh>
#include <common/effects/effect.qh>
+#include <common/models/all.qh>
+#include <common/sounds/all.qh>
#include <common/mutators/mutator/nades/nades.qh>
#include <common/net_linked.qh>
#include <common/physics/movetypes/movetypes.qh>
+#include <common/weapons/all.qh>
#include <lib/csqcmodel/interpolate.qh>
#include <lib/warpzone/anglestransform.qh>
if(autocvar_cl_polytrails && autocvar_cl_polytrails_electro_orb)
{
this.traileffect = EFFECT_Null.m_id;
- PolyTrail t = NEW(PolyTrail, this);
- t.polytrail_tex = "particles/lgbeam.tga";
- t.polytrail_rgb[0] = autocvar_cl_polytrails_electro_orb_rgb0;
- t.polytrail_rgb[1] = autocvar_cl_polytrails_electro_orb_rgb1;
- t.polytrail_rgb[2] = autocvar_cl_polytrails_electro_orb_rgb2;
- t.polytrail_alpha[0] = autocvar_cl_polytrails_electro_orb_alpha0;
- t.polytrail_alpha[1] = autocvar_cl_polytrails_electro_orb_alpha1;
- t.polytrail_alpha[2] = autocvar_cl_polytrails_electro_orb_alpha2;
- t.polytrail_thickness[0] = autocvar_cl_polytrails_electro_orb_thickness0;
- t.polytrail_thickness[1] = autocvar_cl_polytrails_electro_orb_thickness1;
- t.polytrail_thickness[2] = autocvar_cl_polytrails_electro_orb_thickness2;
- t.polytrail_lifetime = autocvar_cl_polytrails_electro_orb_lifetime;
- t.polytrail_segmentsize = autocvar_cl_polytrails_electro_orb_segmentsize;
- t.polytrail_noise = autocvar_cl_polytrails_electro_orb_noise;
- t.polytrail_noisefunc = autocvar_cl_polytrails_electro_orb_noisefunc;
+ PolyTrail_Spawn(NEW(ElectroOrbTrail), this);
}
break;
case PROJECTILE_RPC:
if(autocvar_cl_polytrails && autocvar_cl_polytrails_crylink_bouncing)
{
this.traileffect = EFFECT_Null.m_id;
- PolyTrail t = NEW(PolyTrail, this);
- t.polytrail_tex = "gfx/crosshair_ring.tga"; // TODO: dedicated texture
- t.polytrail_rgb[0] = autocvar_cl_polytrails_crylink_bouncing_rgb0;
- t.polytrail_rgb[1] = autocvar_cl_polytrails_crylink_bouncing_rgb1;
- t.polytrail_rgb[2] = autocvar_cl_polytrails_crylink_bouncing_rgb2;
- t.polytrail_alpha[0] = autocvar_cl_polytrails_crylink_bouncing_alpha0;
- t.polytrail_alpha[1] = autocvar_cl_polytrails_crylink_bouncing_alpha1;
- t.polytrail_alpha[2] = autocvar_cl_polytrails_crylink_bouncing_alpha2;
- t.polytrail_thickness[0] = autocvar_cl_polytrails_crylink_bouncing_thickness0;
- t.polytrail_thickness[1] = autocvar_cl_polytrails_crylink_bouncing_thickness1;
- t.polytrail_thickness[2] = autocvar_cl_polytrails_crylink_bouncing_thickness2;
- t.polytrail_lifetime = autocvar_cl_polytrails_crylink_bouncing_lifetime;
- t.polytrail_segmentsize = autocvar_cl_polytrails_crylink_bouncing_segmentsize;
- t.polytrail_noise = autocvar_cl_polytrails_crylink_bouncing_noise;
- t.polytrail_noisefunc = autocvar_cl_polytrails_crylink_bouncing_noisefunc;
+ PolyTrail_Spawn(NEW(CrylinkBouncingTrail), this);
}
break;
case PROJECTILE_FIREBALL:
if(autocvar_cl_polytrails && autocvar_cl_polytrails_electro_bolt)
{
this.traileffect = EFFECT_Null.m_id;
- PolyTrail t = NEW(PolyTrail, this);
- t.polytrail_tex = "particles/lgbeam.tga";
- t.polytrail_rgb[0] = autocvar_cl_polytrails_electro_bolt_rgb0;
- t.polytrail_rgb[1] = autocvar_cl_polytrails_electro_bolt_rgb1;
- t.polytrail_rgb[2] = autocvar_cl_polytrails_electro_bolt_rgb2;
- t.polytrail_alpha[0] = autocvar_cl_polytrails_electro_bolt_alpha0;
- t.polytrail_alpha[1] = autocvar_cl_polytrails_electro_bolt_alpha1;
- t.polytrail_alpha[2] = autocvar_cl_polytrails_electro_bolt_alpha2;
- t.polytrail_thickness[0] = autocvar_cl_polytrails_electro_bolt_thickness0;
- t.polytrail_thickness[1] = autocvar_cl_polytrails_electro_bolt_thickness1;
- t.polytrail_thickness[2] = autocvar_cl_polytrails_electro_bolt_thickness2;
- t.polytrail_lifetime = autocvar_cl_polytrails_electro_bolt_lifetime;
- t.polytrail_segmentsize = autocvar_cl_polytrails_electro_bolt_segmentsize;
- t.polytrail_noise = autocvar_cl_polytrails_electro_bolt_noise;
- t.polytrail_noisefunc = autocvar_cl_polytrails_electro_bolt_noisefunc;
+ PolyTrail_Spawn(NEW(ElectroBoltTrail), this);
}
break;
case PROJECTILE_CRYLINK:
if(autocvar_cl_polytrails && autocvar_cl_polytrails_crylink_bolt)
{
this.traileffect = EFFECT_Null.m_id;
- PolyTrail t = NEW(PolyTrail, this);
- t.polytrail_tex = "gfx/crosshair_ring.tga"; // TODO: dedicated texture
- t.polytrail_rgb[0] = autocvar_cl_polytrails_crylink_bolt_rgb0;
- t.polytrail_rgb[1] = autocvar_cl_polytrails_crylink_bolt_rgb1;
- t.polytrail_rgb[2] = autocvar_cl_polytrails_crylink_bolt_rgb2;
- t.polytrail_alpha[0] = autocvar_cl_polytrails_crylink_bolt_alpha0;
- t.polytrail_alpha[1] = autocvar_cl_polytrails_crylink_bolt_alpha1;
- t.polytrail_alpha[2] = autocvar_cl_polytrails_crylink_bolt_alpha2;
- t.polytrail_thickness[0] = autocvar_cl_polytrails_crylink_bolt_thickness0;
- t.polytrail_thickness[1] = autocvar_cl_polytrails_crylink_bolt_thickness1;
- t.polytrail_thickness[2] = autocvar_cl_polytrails_crylink_bolt_thickness2;
- t.polytrail_lifetime = autocvar_cl_polytrails_crylink_bolt_lifetime;
- t.polytrail_segmentsize = autocvar_cl_polytrails_crylink_bolt_segmentsize;
- t.polytrail_noise = autocvar_cl_polytrails_crylink_bolt_noise;
- t.polytrail_noisefunc = autocvar_cl_polytrails_crylink_bolt_noisefunc;
+ PolyTrail_Spawn(NEW(CrylinkBoltTrail), this);
}
break;
/*
void loopsound(entity e, int ch, Sound samp, float vol, float attn);
void Ent_RemoveProjectile(entity this);
-
-// projectile polytrails
-bool autocvar_cl_polytrails_crylink_bouncing = true;
-vector autocvar_cl_polytrails_crylink_bouncing_rgb0 = '0.7 0 1';
-vector autocvar_cl_polytrails_crylink_bouncing_rgb1 = '0.5 0 1';
-vector autocvar_cl_polytrails_crylink_bouncing_rgb2 = '0.1 0 0.8';
-float autocvar_cl_polytrails_crylink_bouncing_alpha0 = 0.5;
-float autocvar_cl_polytrails_crylink_bouncing_alpha1 = 0.2;
-float autocvar_cl_polytrails_crylink_bouncing_alpha2 = 0;
-float autocvar_cl_polytrails_crylink_bouncing_thickness0 = 5;
-float autocvar_cl_polytrails_crylink_bouncing_thickness1 = 3;
-float autocvar_cl_polytrails_crylink_bouncing_thickness2 = 3;
-float autocvar_cl_polytrails_crylink_bouncing_lifetime = 0.15;
-float autocvar_cl_polytrails_crylink_bouncing_segmentsize = 80;
-float autocvar_cl_polytrails_crylink_bouncing_noise = 0;
-string autocvar_cl_polytrails_crylink_bouncing_noisefunc = "none";
-
-bool autocvar_cl_polytrails_crylink_bolt = true;
-vector autocvar_cl_polytrails_crylink_bolt_rgb0 = '0.7 0 1';
-vector autocvar_cl_polytrails_crylink_bolt_rgb1 = '0.5 0 1';
-vector autocvar_cl_polytrails_crylink_bolt_rgb2 = '0.1 0 0.8';
-float autocvar_cl_polytrails_crylink_bolt_alpha0 = 0.75;
-float autocvar_cl_polytrails_crylink_bolt_alpha1 = 0.2;
-float autocvar_cl_polytrails_crylink_bolt_alpha2 = 0;
-float autocvar_cl_polytrails_crylink_bolt_thickness0 = 5;
-float autocvar_cl_polytrails_crylink_bolt_thickness1 = 3;
-float autocvar_cl_polytrails_crylink_bolt_thickness2 = 3;
-float autocvar_cl_polytrails_crylink_bolt_lifetime = 0.15;
-float autocvar_cl_polytrails_crylink_bolt_segmentsize = 80;
-float autocvar_cl_polytrails_crylink_bolt_noise = 0;
-string autocvar_cl_polytrails_crylink_bolt_noisefunc = "none";
-
-bool autocvar_cl_polytrails_electro_bolt = true;
-vector autocvar_cl_polytrails_electro_bolt_rgb0 = '0.75 0.75 1';
-vector autocvar_cl_polytrails_electro_bolt_rgb1 = '0.45 0.45 1';
-vector autocvar_cl_polytrails_electro_bolt_rgb2 = '0.1 0.1 0.75';
-float autocvar_cl_polytrails_electro_bolt_alpha0 = 1;
-float autocvar_cl_polytrails_electro_bolt_alpha1 = 0.5;
-float autocvar_cl_polytrails_electro_bolt_alpha2 = 0;
-float autocvar_cl_polytrails_electro_bolt_thickness0 = 5;
-float autocvar_cl_polytrails_electro_bolt_thickness1 = 5;
-float autocvar_cl_polytrails_electro_bolt_thickness2 = 0;
-float autocvar_cl_polytrails_electro_bolt_lifetime = 0.27;
-float autocvar_cl_polytrails_electro_bolt_segmentsize = 10;
-float autocvar_cl_polytrails_electro_bolt_noise = 5;
-string autocvar_cl_polytrails_electro_bolt_noisefunc = "chaotic";
-
-bool autocvar_cl_polytrails_electro_orb = true;
-vector autocvar_cl_polytrails_electro_orb_rgb0 = '0.8 0.8 1';
-vector autocvar_cl_polytrails_electro_orb_rgb1 = '0.5 0.5 1';
-vector autocvar_cl_polytrails_electro_orb_rgb2 = '0.1 0.1 0.7';
-float autocvar_cl_polytrails_electro_orb_alpha0 = 1;
-float autocvar_cl_polytrails_electro_orb_alpha1 = 0.5;
-float autocvar_cl_polytrails_electro_orb_alpha2 = 0;
-float autocvar_cl_polytrails_electro_orb_thickness0 = 15;
-float autocvar_cl_polytrails_electro_orb_thickness1 = 7;
-float autocvar_cl_polytrails_electro_orb_thickness2 = 0;
-float autocvar_cl_polytrails_electro_orb_lifetime = 0.18;
-float autocvar_cl_polytrails_electro_orb_segmentsize = 10;
-float autocvar_cl_polytrails_electro_orb_noise = 10;
-string autocvar_cl_polytrails_electro_orb_noisefunc = "chaotic";
#include <common/effects/all.qh>
#endif
+#ifdef CSQC
+#include <client/polytrails.qh>
+#endif
+
#include <common/util.qh>
REGISTRY(Weapons, 72) // Increase as needed. Can be up to 72.
#include <common/effects/qc/_mod.qh>
#endif
+#ifdef CSQC
+#include <client/polytrails.qh>
+#endif
+
USING(WepSet, vector);
const int MAX_WEAPONSLOTS = 2;
void W_Crylink_Dequeue(entity e);
#endif
+
+#ifdef CSQC
+bool autocvar_cl_polytrails_crylink_bouncing = true;
+float autocvar_cl_polytrails_crylink_bouncing_head_alpha = 0.5;
+vector autocvar_cl_polytrails_crylink_bouncing_head_color = '0.7 0 1';
+float autocvar_cl_polytrails_crylink_bouncing_head_thickness = 5;
+float autocvar_cl_polytrails_crylink_bouncing_body_alpha = 0.2;
+vector autocvar_cl_polytrails_crylink_bouncing_body_color = '0.5 0 1';
+float autocvar_cl_polytrails_crylink_bouncing_body_thickness = 3;
+float autocvar_cl_polytrails_crylink_bouncing_tail_alpha = 0;
+vector autocvar_cl_polytrails_crylink_bouncing_tail_color = '0.1 0 0.8';
+float autocvar_cl_polytrails_crylink_bouncing_tail_thickness = 13;
+float autocvar_cl_polytrails_crylink_bouncing_lifetime = 0.15;
+float autocvar_cl_polytrails_crylink_bouncing_segmentsize = 80;
+float autocvar_cl_polytrails_crylink_bouncing_noise = 0;
+string autocvar_cl_polytrails_crylink_bouncing_noisefunc = "none";
+CLASS(CrylinkBouncingTrail, PolyTrail)
+ ATTRIB(CrylinkBouncingTrail, polytrail_tex, string, "gfx/crosshair_ring.tga"); // TODO: dedicated texture
+ ATTRIB(CrylinkBouncingTrail, polytrail_lifetime, float, autocvar_cl_polytrails_crylink_bouncing_lifetime);
+ ATTRIB(CrylinkBouncingTrail, polytrail_noise, float, autocvar_cl_polytrails_crylink_bouncing_noise);
+ ATTRIB(CrylinkBouncingTrail, polytrail_segmentsize, float, autocvar_cl_polytrails_crylink_bouncing_segmentsize);
+ ATTRIB(CrylinkBouncingTrail, polytrail_noisefunc, string, autocvar_cl_polytrails_crylink_bouncing_noisefunc);
+ ATTRIB(CrylinkBouncingTrail, polytrail_head_alpha, float, autocvar_cl_polytrails_crylink_bouncing_head_alpha);
+ ATTRIB(CrylinkBouncingTrail, polytrail_head_color, vector, autocvar_cl_polytrails_crylink_bouncing_head_color);
+ ATTRIB(CrylinkBouncingTrail, polytrail_head_thickness, float, autocvar_cl_polytrails_crylink_bouncing_head_thickness);
+ ATTRIB(CrylinkBouncingTrail, polytrail_body_alpha, float, autocvar_cl_polytrails_crylink_bouncing_body_alpha);
+ ATTRIB(CrylinkBouncingTrail, polytrail_body_color, vector, autocvar_cl_polytrails_crylink_bouncing_body_color);
+ ATTRIB(CrylinkBouncingTrail, polytrail_body_thickness, float, autocvar_cl_polytrails_crylink_bouncing_body_thickness);
+ ATTRIB(CrylinkBouncingTrail, polytrail_tail_alpha, float, autocvar_cl_polytrails_crylink_bouncing_tail_alpha);
+ ATTRIB(CrylinkBouncingTrail, polytrail_tail_color, vector, autocvar_cl_polytrails_crylink_bouncing_tail_color);
+ ATTRIB(CrylinkBouncingTrail, polytrail_tail_thickness, float, autocvar_cl_polytrails_crylink_bouncing_tail_thickness);
+ENDCLASS(CrylinkBouncingTrail)
+
+bool autocvar_cl_polytrails_crylink_bolt = true;
+float autocvar_cl_polytrails_crylink_bolt_head_alpha = 0.75;
+vector autocvar_cl_polytrails_crylink_bolt_head_color = '0.7 0 1';
+float autocvar_cl_polytrails_crylink_bolt_head_thickness = 5;
+float autocvar_cl_polytrails_crylink_bolt_body_alpha = 0.2;
+vector autocvar_cl_polytrails_crylink_bolt_body_color = '0.5 0 1';
+float autocvar_cl_polytrails_crylink_bolt_body_thickness = 3;
+float autocvar_cl_polytrails_crylink_bolt_tail_alpha = 0;
+vector autocvar_cl_polytrails_crylink_bolt_tail_color = '0.1 0 0.8';
+float autocvar_cl_polytrails_crylink_bolt_tail_thickness = 3;
+float autocvar_cl_polytrails_crylink_bolt_lifetime = 0.15;
+float autocvar_cl_polytrails_crylink_bolt_segmentsize = 80;
+float autocvar_cl_polytrails_crylink_bolt_noise = 0;
+string autocvar_cl_polytrails_crylink_bolt_noisefunc = "none";
+CLASS(CrylinkBoltTrail, PolyTrail)
+ ATTRIB(CrylinkBoltTrail, polytrail_tex, string, "gfx/crosshair_ring.tga"); // TODO: dedicated texture
+ ATTRIB(CrylinkBoltTrail, polytrail_lifetime, float, autocvar_cl_polytrails_crylink_bolt_lifetime);
+ ATTRIB(CrylinkBoltTrail, polytrail_noise, float, autocvar_cl_polytrails_crylink_bolt_noise);
+ ATTRIB(CrylinkBoltTrail, polytrail_segmentsize, float, autocvar_cl_polytrails_crylink_bolt_segmentsize);
+ ATTRIB(CrylinkBoltTrail, polytrail_noisefunc, string, autocvar_cl_polytrails_crylink_bolt_noisefunc);
+ ATTRIB(CrylinkBoltTrail, polytrail_head_alpha, float, autocvar_cl_polytrails_crylink_bolt_head_alpha);
+ ATTRIB(CrylinkBoltTrail, polytrail_head_color, vector, autocvar_cl_polytrails_crylink_bolt_head_color);
+ ATTRIB(CrylinkBoltTrail, polytrail_head_thickness, float, autocvar_cl_polytrails_crylink_bolt_head_thickness);
+ ATTRIB(CrylinkBoltTrail, polytrail_body_alpha, float, autocvar_cl_polytrails_crylink_bolt_body_alpha);
+ ATTRIB(CrylinkBoltTrail, polytrail_body_color, vector, autocvar_cl_polytrails_crylink_bolt_body_color);
+ ATTRIB(CrylinkBoltTrail, polytrail_body_thickness, float, autocvar_cl_polytrails_crylink_bolt_body_thickness);
+ ATTRIB(CrylinkBoltTrail, polytrail_tail_alpha, float, autocvar_cl_polytrails_crylink_bolt_tail_alpha);
+ ATTRIB(CrylinkBoltTrail, polytrail_tail_color, vector, autocvar_cl_polytrails_crylink_bolt_tail_color);
+ ATTRIB(CrylinkBoltTrail, polytrail_tail_thickness, float, autocvar_cl_polytrails_crylink_bolt_tail_thickness);
+ENDCLASS(CrylinkBoltTrail)
+#endif
.float electro_secondarytime;
void W_Electro_ExplodeCombo(entity this);
#endif
+
+#ifdef CSQC
+bool autocvar_cl_polytrails_electro_bolt = true;
+float autocvar_cl_polytrails_electro_bolt_head_alpha = 1;
+vector autocvar_cl_polytrails_electro_bolt_head_color = '0.75 0.75 1';
+float autocvar_cl_polytrails_electro_bolt_head_thickness = 5;
+float autocvar_cl_polytrails_electro_bolt_body_alpha = 0.5;
+vector autocvar_cl_polytrails_electro_bolt_body_color = '0.45 0.45 1';
+float autocvar_cl_polytrails_electro_bolt_body_thickness = 5;
+float autocvar_cl_polytrails_electro_bolt_tail_alpha = 0;
+vector autocvar_cl_polytrails_electro_bolt_tail_color = '0.1 0.1 0.75';
+float autocvar_cl_polytrails_electro_bolt_tail_thickness = 0;
+float autocvar_cl_polytrails_electro_bolt_lifetime = 0.27;
+float autocvar_cl_polytrails_electro_bolt_segmentsize = 10;
+float autocvar_cl_polytrails_electro_bolt_noise = 5;
+string autocvar_cl_polytrails_electro_bolt_noisefunc = "chaotic";
+CLASS(ElectroBoltTrail, PolyTrail)
+ ATTRIB(ElectroBoltTrail, polytrail_tex, string, "particles/lgbeam.tga");
+ ATTRIB(ElectroBoltTrail, polytrail_lifetime, float, autocvar_cl_polytrails_electro_bolt_lifetime);
+ ATTRIB(ElectroBoltTrail, polytrail_noise, float, autocvar_cl_polytrails_electro_bolt_noise);
+ ATTRIB(ElectroBoltTrail, polytrail_segmentsize, float, autocvar_cl_polytrails_electro_bolt_segmentsize);
+ ATTRIB(ElectroBoltTrail, polytrail_noisefunc, string, autocvar_cl_polytrails_electro_bolt_noisefunc);
+ ATTRIB(ElectroBoltTrail, polytrail_head_alpha, float, autocvar_cl_polytrails_electro_bolt_head_alpha);
+ ATTRIB(ElectroBoltTrail, polytrail_head_color, vector, autocvar_cl_polytrails_electro_bolt_head_color);
+ ATTRIB(ElectroBoltTrail, polytrail_head_thickness, float, autocvar_cl_polytrails_electro_bolt_head_thickness);
+ ATTRIB(ElectroBoltTrail, polytrail_body_alpha, float, autocvar_cl_polytrails_electro_bolt_body_alpha);
+ ATTRIB(ElectroBoltTrail, polytrail_body_color, vector, autocvar_cl_polytrails_electro_bolt_body_color);
+ ATTRIB(ElectroBoltTrail, polytrail_body_thickness, float, autocvar_cl_polytrails_electro_bolt_body_thickness);
+ ATTRIB(ElectroBoltTrail, polytrail_tail_alpha, float, autocvar_cl_polytrails_electro_bolt_tail_alpha);
+ ATTRIB(ElectroBoltTrail, polytrail_tail_color, vector, autocvar_cl_polytrails_electro_bolt_tail_color);
+ ATTRIB(ElectroBoltTrail, polytrail_tail_thickness, float, autocvar_cl_polytrails_electro_bolt_tail_thickness);
+ENDCLASS(ElectroBoltTrail)
+
+bool autocvar_cl_polytrails_electro_orb = true;
+float autocvar_cl_polytrails_electro_orb_head_alpha = 1;
+vector autocvar_cl_polytrails_electro_orb_head_color = '0.8 0.8 1';
+float autocvar_cl_polytrails_electro_orb_head_thickness = 15;
+float autocvar_cl_polytrails_electro_orb_body_alpha = 0.5;
+vector autocvar_cl_polytrails_electro_orb_body_color = '0.5 0.5 1';
+float autocvar_cl_polytrails_electro_orb_body_thickness = 7;
+float autocvar_cl_polytrails_electro_orb_tail_alpha = 0;
+vector autocvar_cl_polytrails_electro_orb_tail_color = '0.1 0.1 0.7';
+float autocvar_cl_polytrails_electro_orb_tail_thickness = 0;
+float autocvar_cl_polytrails_electro_orb_lifetime = 0.18;
+float autocvar_cl_polytrails_electro_orb_segmentsize = 10;
+float autocvar_cl_polytrails_electro_orb_noise = 10;
+string autocvar_cl_polytrails_electro_orb_noisefunc = "chaotic";
+CLASS(ElectroOrbTrail, PolyTrail)
+ ATTRIB(ElectroOrbTrail, polytrail_tex, string, "particles/lgbeam.tga");
+ ATTRIB(ElectroOrbTrail, polytrail_lifetime, float, autocvar_cl_polytrails_electro_orb_lifetime);
+ ATTRIB(ElectroOrbTrail, polytrail_noise, float, autocvar_cl_polytrails_electro_orb_noise);
+ ATTRIB(ElectroOrbTrail, polytrail_segmentsize, float, autocvar_cl_polytrails_electro_orb_segmentsize);
+ ATTRIB(ElectroOrbTrail, polytrail_noisefunc, string, autocvar_cl_polytrails_electro_orb_noisefunc);
+ ATTRIB(ElectroOrbTrail, polytrail_head_alpha, float, autocvar_cl_polytrails_electro_orb_head_alpha);
+ ATTRIB(ElectroOrbTrail, polytrail_head_color, vector, autocvar_cl_polytrails_electro_orb_head_color);
+ ATTRIB(ElectroOrbTrail, polytrail_head_thickness, float, autocvar_cl_polytrails_electro_orb_head_thickness);
+ ATTRIB(ElectroOrbTrail, polytrail_body_alpha, float, autocvar_cl_polytrails_electro_orb_body_alpha);
+ ATTRIB(ElectroOrbTrail, polytrail_body_color, vector, autocvar_cl_polytrails_electro_orb_body_color);
+ ATTRIB(ElectroOrbTrail, polytrail_body_thickness, float, autocvar_cl_polytrails_electro_orb_body_thickness);
+ ATTRIB(ElectroOrbTrail, polytrail_tail_alpha, float, autocvar_cl_polytrails_electro_orb_tail_alpha);
+ ATTRIB(ElectroOrbTrail, polytrail_tail_color, vector, autocvar_cl_polytrails_electro_orb_tail_color);
+ ATTRIB(ElectroOrbTrail, polytrail_tail_thickness, float, autocvar_cl_polytrails_electro_orb_tail_thickness);
+ENDCLASS(ElectroOrbTrail)
+#endif