From 539f95d82152a32692a23c777c1d6944c4be49d2 Mon Sep 17 00:00:00 2001 From: Samual Date: Thu, 26 Jul 2012 02:58:07 -0400 Subject: [PATCH] Make it ACTUALLY use the proper spread --- qcsrc/client/particles.qc | 6 +++--- qcsrc/server/w_laser.qc | 10 ++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index 3c9961da7..7056f2ac5 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -334,9 +334,9 @@ void Net_ReadShockwaveParticle() if(lastdist) { R_BeginPolygon("", DRAWFLAG_NORMAL); - R_PolygonVertex(lastorg, '0 0 0', '1 0 0', 1); - R_PolygonVertex(neworg, '0 0 0', '1 0 0', 1); - R_PolygonVertex(shotorg, '0 0 0', '1 0 0', 1); + R_PolygonVertex(lastorg, '0 0 0', '1 0 0', 0.5); + R_PolygonVertex(neworg, '0 0 0', '1 0 0', 0.5); + R_PolygonVertex(shotorg, '0 0 0', '1 0 0', 0.5); R_EndPolygon(); } diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index f2ece0cad..fd98bf379 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -7,9 +7,9 @@ void() W_LastWeapon; .float swing_prev; .entity swing_alreadyhit; -void SendCSQCShockwaveParticle(float spread, vector endpos, entity transform) +void SendCSQCShockwaveParticle(vector endpos, entity transform) { - WarpZone_UnTransformOrigin(transform, endpos); + WarpZone_TransformOrigin(transform, endpos); WriteByte(MSG_BROADCAST, SVC_TEMPENTITY); WriteByte(MSG_BROADCAST, TE_CSQC_SHOCKWAVEPARTICLE); WriteCoord(MSG_BROADCAST, w_shotorg_x); @@ -18,7 +18,9 @@ void SendCSQCShockwaveParticle(float spread, vector endpos, entity transform) WriteCoord(MSG_BROADCAST, endpos_x); WriteCoord(MSG_BROADCAST, endpos_y); WriteCoord(MSG_BROADCAST, endpos_z); - WriteByte(MSG_BROADCAST, bound(0, 255 * spread, 255)); + + makevectors(w_shotdir); + WriteByte(MSG_BROADCAST, bound(0, 255 * vlen(normalize((endpos + (v_up * autocvar_g_balance_laser_primary_spread_max)) - w_shotorg) - w_shotdir), 255)); } void W_Laser_Touch() @@ -127,7 +129,7 @@ void W_Laser_Shockwave() RadiusDamageForSource(self, trace_endpos, '0 0 0', self, autocvar_g_balance_laser_primary_damage, autocvar_g_balance_laser_primary_edgedamage, autocvar_g_balance_laser_primary_jumpradius, world, self, TRUE, autocvar_g_balance_laser_primary_force, WEP_LASER, world); // also do the firing effect now - SendCSQCShockwaveParticle(autocvar_g_balance_laser_primary_spread, attack_hitpos, transform); + SendCSQCShockwaveParticle(attack_endpos, transform); // did we hit a player directly? if(aim_ent.takedamage) -- 2.39.2