}
if(self.noise != "")
{
- self.origin = p;
+ setorigin(self, p);
sound(self, CH_AMBIENT, self.noise, VOL_BASE * self.volume, self.atten);
}
self.just_toggled = 0;
--i;
}
}
- self.origin = o;
+ setorigin(self, o);
}
void Ent_PointParticles_Remove()
shotorg_x = ReadCoord(); shotorg_y = ReadCoord(); shotorg_z = ReadCoord();
endpos_x = ReadCoord(); endpos_y = ReadCoord(); endpos_z = ReadCoord();
charge = ReadByte() / 255.0;
-
+
pointparticles(particleeffectnum("nex_muzzleflash"), shotorg, normalize(endpos - shotorg) * 1000, 1);
-
+
//draw either the old v2.3 beam or the new beam
charge = sqrt(charge); // divide evenly among trail spacing and alpha
- particles_alphamin = particles_alphamax = charge;
+ particles_alphamin = particles_alphamax = particles_fade = charge;
+
if (autocvar_cl_particles_oldnexbeam && (getstati(STAT_ALLOW_OLDNEXBEAM) || isdemo()))
- WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos, charge, 1);
+ WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("TE_TEI_G3"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
else
- WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("nex_beam"), shotorg, endpos, charge, 1);
+ WarpZone_TrailParticles_WithMultiplier(world, particleeffectnum("nex_beam"), shotorg, endpos, 1, PARTICLES_USEALPHA | PARTICLES_USEFADE);
}
.vector sw_shotorg;
void Draw_Shockwave()
{
- float a = bound(0, (0.6 - ((time - self.sw_time) / 0.4)), 0.6);
+ float a = bound(0, (0.5 - ((time - self.sw_time) / 0.4)), 0.5);
- if not(a) { remove(self); }
+ if(!a) { remove(self); }
vector deviation, angle;
- vector first_min_end, prev_min_end, new_min_end;
- vector first_max_end, prev_max_end, new_max_end;
+ vector sw_color = getcsqcplayercolor(self.sv_entnum); // GetTeamRGB(GetPlayerColor(self.sv_entnum));
+
+ vector first_min_end = '0 0 0', prev_min_end = '0 0 0', new_min_end = '0 0 0';
+ vector first_max_end = '0 0 0', prev_max_end = '0 0 0', new_max_end = '0 0 0';
float new_max_dist, new_min_dist;
vectorvectors(shotdir);
vector right = v_right;
vector up = v_up;
-
+
float counter, dist_before_normal = 200, shots = 20;
vector min_end = ((self.sw_shotorg + (shotdir * dist_before_normal)) + (up * self.sw_spread_min));
if(counter >= 1)
{
R_BeginPolygon("", DRAWFLAG_NORMAL);
- R_PolygonVertex(prev_min_end, '0 0 0', '1 0 0', a);
- R_PolygonVertex(new_min_end, '0 0 0', '1 0 0', a);
- R_PolygonVertex(self.sw_shotorg, '0 0 0', '1 0 0', a);
+ R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
+ R_PolygonVertex(new_min_end, '0 0 0', sw_color, a);
+ R_PolygonVertex(self.sw_shotorg, '0 0 0', sw_color, a);
R_EndPolygon();
R_BeginPolygon("", DRAWFLAG_NORMAL);
- R_PolygonVertex(new_min_end, '0 0 0', '1 0 0', a);
- R_PolygonVertex(prev_min_end, '0 0 0', '1 0 0', a);
- R_PolygonVertex(prev_max_end, '0 0 0', '1 0 0', a);
- R_PolygonVertex(new_max_end, '0 0 0', '1 0 0', a);
+ R_PolygonVertex(new_min_end, '0 0 0', sw_color, a);
+ R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
+ R_PolygonVertex(prev_max_end, '0 0 0', sw_color, a);
+ R_PolygonVertex(new_max_end, '0 0 0', sw_color, a);
R_EndPolygon();
}
if((counter + 1) == shots)
{
R_BeginPolygon("", DRAWFLAG_NORMAL);
- R_PolygonVertex(prev_min_end, '0 0 0', '1 0 0', a);
- R_PolygonVertex(first_min_end, '0 0 0', '1 0 0', a);
- R_PolygonVertex(self.sw_shotorg, '0 0 0', '1 0 0', a);
+ R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
+ R_PolygonVertex(first_min_end, '0 0 0', sw_color, a);
+ R_PolygonVertex(self.sw_shotorg, '0 0 0', sw_color, a);
R_EndPolygon();
R_BeginPolygon("", DRAWFLAG_NORMAL);
- R_PolygonVertex(first_min_end, '0 0 0', '1 0 0', a);
- R_PolygonVertex(prev_min_end, '0 0 0', '1 0 0', a);
- R_PolygonVertex(prev_max_end, '0 0 0', '1 0 0', a);
- R_PolygonVertex(first_max_end, '0 0 0', '1 0 0', a);
+ R_PolygonVertex(first_min_end, '0 0 0', sw_color, a);
+ R_PolygonVertex(prev_min_end, '0 0 0', sw_color, a);
+ R_PolygonVertex(prev_max_end, '0 0 0', sw_color, a);
+ R_PolygonVertex(first_max_end, '0 0 0', sw_color, a);
R_EndPolygon();
}
}
shockwave.sw_spread_max = ReadByte();
shockwave.sw_spread_min = ReadByte();
+ shockwave.sv_entnum = ReadByte();
+
shockwave.sw_time = time;
}