From 2ba4363ee805aa1f2c65719c65328693722b2c55 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sun, 22 Jul 2012 02:21:34 -0400 Subject: [PATCH] New effect spread calculation for CSQC particle effect (needs cleanup) --- qcsrc/client/particles.qc | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/qcsrc/client/particles.qc b/qcsrc/client/particles.qc index e4276df83..7815fc26f 100644 --- a/qcsrc/client/particles.qc +++ b/qcsrc/client/particles.qc @@ -311,6 +311,8 @@ void Net_ReadShockwaveParticle() float counter, shots; + float ang; + shots = 10; vector shotdir = normalize(endpos - shotorg); @@ -320,13 +322,15 @@ void Net_ReadShockwaveParticle() for(counter = 0; counter < shots; ++counter) { - deviation = '0 0 0'; - makevectors('0 360 0' * (0.75 + (counter - 0.5) / shots)); - deviation_y = v_forward_x; - deviation_z = v_forward_y; - deviation = deviation * spread; + ang = M_PI * 2.0 * (0.75 + (counter - 0.5) / shots); + deviation = ((shotdir + (right * cos(ang) * 0.075) + (up * sin(ang) * 0.075)) * 1000); + //deviation = '0 0 0'; + //makevectors('0 360 0' * (0.75 + (counter - 0.5) / shots)); + //deviation_y = v_forward_x; + //deviation_z = v_forward_y; + //deviation = deviation * spread; //print("v_forward = ", vtos(deviation), ".\n"); - deviation = ((shotdir + (right * deviation_y) + (up * deviation_z)) * 1000); + //deviation = ((shotdir + (right * deviation_y) + (up * deviation_z)) * 1000); //deviation = W_CalculateSpread(shotdir, spread, 1, cvar("g_projectiles_spread_style")); //print("deviation = ", vtos(deviation), ".\n"); -- 2.39.2