All effect-stuff was copy pasted, red and green RGB components of colors were switched.
Added a fallback to use the blaster bullet effects if the hlac ones aren't available to the client.
There's many reasons to make hlac's bullets green, including:
- The wpcolor of hlac is already green, despite its bullets being red,
- ... meaning the crosshair with `crosshair_color_special 1` is already green,
- The _simple simpleitems color for hlac is already green,
- Bullets shot by a hlac aren't easily differentiable to those shot by a blaster if both are red,
- Hlac and blaster are different guns so should shoot different bullets, I know some servers make hlac bullets do different damage to blaster bullets,
- Etc.
This change will also allow for someone to make the hlac_impact effects smaller in size in future, since they can easily obstruct the victim's view due to how spammy the gun is.
count 3
size 16 16
velocityjitter 256 256 256
+effect hlac_muzzleflash
+ type smoke
+ airfriction 10
+ alpha 256 512 6280
+ color 0x00cc00 0x00ff00
+ countabsolute 1
+ lightcolor 0.1 3 0.1
+ lightradiusfade 2000
+ lightradius 200
+ sizeincrease -100
+ size 10 15
+ stretchfactor 2
+ tex 65 65
+effect hlac_muzzleflash
+ type spark
+ airfriction 10
+ alpha 256 512 6280
+ color 0x42b415 0x00ff00
+ count 3
+ originjitter 2 2 2
+ rotate -180 180 4000 -4000
+ sizeincrease -100
+ size 5 7
+ stretchfactor 2.300000
+ tex 43 43
+ velocityjitter 150 150 150
+ velocitymultiplier 0.200000
+effect hlac_muzzleflash
+ type spark
+ airfriction 12
+ alpha 256 512 6280
+ color 0x42ff00 0x00ff00
+ count 6
+ originjitter 2 2 2
+ sizeincrease -100
+ size 7 9
+ stretchfactor 2
+ tex 8 15
+ velocityjitter 100 100 100
+ velocitymultiplier 0.200000
+effect hlac_impact
+ type decal
+ alpha 256 256 0
+ countabsolute 1
+ lightcolor 0.4 8 0.4
+ lightradiusfade 500
+ lightradius 200
+ originjitter 14 14 14
+ size 24 24
+ tex 47 47
+effect hlac_impact
+ type static
+ alpha 256 256 1024
+ color 0x20FF10 0x20FF10
+ countabsolute 1
+ size 24 24
+ tex 39 39
+effect hlac_impact
+ type spark
+ airfriction 6
+ alpha 256 256 1024
+ color 0x008000 0x80FF20
+ count 128
+ liquidfriction 6
+ size 4 4
+ velocityjitter 256 256 256
+effect hlac_impact
+ type smoke
+ alpha 128 256 256
+ color 0x008000 0x80FF20
+ count 4
+ originjitter 1 1 1
+ sizeincrease 6
+ size 12 12
+ tex 48 55
+ velocityjitter 16 16 16
+ velocitymultiplier 0.010000
effect nex_muzzleflash
type spark
airfriction 9
type smoke
airfriction -0.350000
alpha 128 16 128
- color 0x880000 0xff4400
+ color 0x008800 0x44ff00
count 3
notunderwater
originjitter 4 4 4
EFFECT(0, CRYLINK_JOINEXPLODE, "crylink_joinexplode")
EFFECT(0, CRYLINK_MUZZLEFLASH, "crylink_muzzleflash")
+EFFECT(0, GREEN_HLAC_IMPACT, "hlac_impact")
+EFFECT(0, GREEN_HLAC_MUZZLEFLASH, "hlac_muzzleflash")
+entity EFFECT_HLAC_IMPACT()
+{
+ return (particleeffectnum(EFFECT_GREEN_HLAC_IMPACT) < 0)
+ ? EFFECT_BLASTER_IMPACT
+ : EFFECT_GREEN_HLAC_IMPACT;
+}
+entity EFFECT_HLAC_MUZZLEFLASH()
+{
+ return (particleeffectnum(EFFECT_GREEN_HLAC_MUZZLEFLASH) < 0)
+ ? EFFECT_BLASTER_MUZZLEFLASH
+ : EFFECT_GREEN_HLAC_MUZZLEFLASH;
+}
+
EFFECT(0, VORTEX_BEAM, "nex_beam")
EFFECT(0, VORTEX_BEAM_OLD, "TE_TEI_G3")
EFFECT(0, VORTEX_IMPACT, "nex_impact")
MY(velocityjitter) = '256.0 256.0 256.0';
}
+DEF(hlac_muzzleflash);
+// glow and light
+SUB(hlac_muzzleflash) {
+ MY(airfriction) = 10;
+ MY(alpha_min) = 256;
+ MY(alpha_max) = 512;
+ MY(alpha_fade) = 6280;
+ MY(color_min) = "0x00cc00";
+ MY(color_max) = "0x00ff00";
+ MY(countabsolute) = 1;
+ MY(lightcolor) = '0.1 3.0 0.1';
+ MY(lightradiusfade) = 2000;
+ MY(lightradius) = 200;
+ MY(sizeincrease) = -100;
+ MY(size_min) = 10;
+ MY(size_max) = 15;
+ MY(stretchfactor) = 2;
+ MY(tex_min) = 65;
+ MY(tex_max) = 65;
+ MY(type) = "smoke";
+}
+// electricity
+SUB(hlac_muzzleflash) {
+ MY(airfriction) = 10;
+ MY(alpha_min) = 256;
+ MY(alpha_max) = 512;
+ MY(alpha_fade) = 6280;
+ MY(color_min) = "0x42b415";
+ MY(color_max) = "0x00ff00";
+ MY(count) = 3;
+ MY(originjitter) = '2.0 2.0 2.0';
+ MY(startangle_min) = -180;
+ MY(startangle_max) = 180;
+ MY(spin_min) = 4000;
+ MY(spin_max) = -4000;
+ MY(sizeincrease) = -100;
+ MY(size_min) = 5;
+ MY(size_max) = 7;
+ MY(stretchfactor) = 2.300000;
+ MY(tex_min) = 43;
+ MY(tex_max) = 43;
+ MY(type) = "spark";
+ MY(velocityjitter) = '150.0 150.0 150.0';
+ MY(velocitymultiplier) = 0.200000;
+}
+// fire
+SUB(hlac_muzzleflash) {
+ MY(airfriction) = 12;
+ MY(alpha_min) = 256;
+ MY(alpha_max) = 512;
+ MY(alpha_fade) = 6280;
+ MY(color_min) = "0x42ff00";
+ MY(color_max) = "0x42ff00";
+ MY(count) = 6;
+ MY(originjitter) = '2.0 2.0 2.0';
+ MY(sizeincrease) = -100;
+ MY(size_min) = 7;
+ MY(size_max) = 9;
+ MY(stretchfactor) = 2;
+ MY(tex_min) = 8;
+ MY(tex_max) = 15;
+ MY(type) = "spark";
+ MY(velocityjitter) = '100.0 100.0 100.0';
+ MY(velocitymultiplier) = 0.200000;
+}
+
+DEF(hlac_impact);
+// decal
+SUB(hlac_impact) {
+ MY(alpha_min) = 256;
+ MY(alpha_max) = 256;
+ MY(countabsolute) = 1;
+ MY(lightcolor) = '0.4 8.0 0.4';
+ MY(lightradiusfade) = 500;
+ MY(lightradius) = 200;
+ MY(originjitter) = '14.0 14.0 14.0';
+ MY(size_min) = 24;
+ MY(size_max) = 24;
+ MY(tex_min) = 47;
+ MY(tex_max) = 47;
+ MY(type) = "decal";
+}
+// flare effect
+SUB(hlac_impact) {
+ MY(alpha_min) = 256;
+ MY(alpha_max) = 256;
+ MY(alpha_fade) = 1024;
+ MY(color_min) = "0x20FF10";
+ MY(color_max) = "0x20FF10";
+ MY(countabsolute) = 1;
+ MY(size_min) = 24;
+ MY(size_max) = 24;
+ MY(tex_min) = 39;
+ MY(tex_max) = 39;
+ MY(type) = "static";
+}
+// sparks that rapidly expand and rapidly slow down to form an interesting spherical effect
+SUB(hlac_impact) {
+ MY(airfriction) = 6;
+ MY(alpha_min) = 256;
+ MY(alpha_max) = 256;
+ MY(alpha_fade) = 1024;
+ MY(color_min) = "0x008000";
+ MY(color_max) = "0x80FF20";
+ MY(count) = 128;
+ MY(liquidfriction) = 6;
+ MY(size_min) = 4;
+ MY(size_max) = 4;
+ MY(type) = "spark";
+ MY(velocityjitter) = '256.0 256.0 256.0';
+}
+SUB(hlac_impact) {
+ MY(alpha_min) = 128;
+ MY(alpha_max) = 256;
+ MY(alpha_fade) = 256;
+ MY(color_min) = "0x008000";
+ MY(color_max) = "0x80FF20";
+ MY(count) = 4;
+ MY(originjitter) = '1.0 1.0 1.0';
+ MY(sizeincrease) = 6;
+ MY(size_min) = 12;
+ MY(size_max) = 12;
+ MY(tex_min) = 48;
+ MY(tex_max) = 55;
+ MY(type) = "smoke";
+ MY(velocityjitter) = '16.0 16.0 16.0';
+ MY(velocitymultiplier) = 0.010000;
+}
+
DEF(nex_muzzleflash);
SUB(nex_muzzleflash) {
MY(airfriction) = 9;
MY(alpha_min) = 128;
MY(alpha_max) = 16;
MY(alpha_fade) = 128;
- MY(color_min) = "0x880000";
- MY(color_max) = "0xff4400";
+ MY(color_min) = "0x008800";
+ MY(color_max) = "0x44ff00";
MY(count) = 3;
MY(notunderwater) = true;
MY(originjitter) = '4.0 4.0 4.0';
METHOD(HLAC, wr_impacteffect, void(entity thiswep, entity actor))
{
vector org2 = w_org + w_backoff * 2;
- pointparticles(EFFECT_BLASTER_IMPACT, org2, w_backoff * 1000, 1);
+ pointparticles(EFFECT_HLAC_IMPACT(), org2, w_backoff * 1000, 1);
if(!w_issilent)
sound(actor, CH_SHOTS, SND_LASERIMPACT, VOL_BASE, ATTN_NORM);
}
#ifdef GAMEQC
/* model */ ATTRIB(HLAC, m_model, Model, MDL_HLAC_ITEM);
/* flash mdl */ ATTRIB(HLAC, m_muzzlemodel, Model, MDL_Null);
-/* flash eff */ ATTRIB(HLAC, m_muzzleeffect, entity, EFFECT_BLASTER_MUZZLEFLASH);
+/* flash eff */ ATTRIB(HLAC, m_muzzleeffect, entity, EFFECT_HLAC_MUZZLEFLASH());
#endif
/* crosshair */ ATTRIB(HLAC, w_crosshair, string, "gfx/crosshairhlac");
/* crosshair */ ATTRIB(HLAC, w_crosshair_size, float, 0.6);