set g_balance_laser_secondary_refire 0.7
set g_balance_laser_secondary_animtime 0.3
set g_balance_laser_secondary_lifetime 30
+set g_balance_laser_secondary_melee_delay 0.25 // 0.35 was too slow
+set g_balance_laser_secondary_melee_range 120
+set g_balance_laser_secondary_melee_swing_side 120
+set g_balance_laser_secondary_melee_swing_up 30
+set g_balance_laser_secondary_melee_time 0.15
+set g_balance_laser_secondary_melee_traces 10
+set g_balance_laser_secondary_melee_no_doubleslap 1
+set g_balance_laser_secondary_melee_nonplayerdamage 40
+set g_balance_laser_secondary_melee_multihit 1
+set g_balance_laser_secondary_damage 80
set g_balance_laser_secondary_shotangle 0
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_force_zscale 1
set g_balance_laser_secondary_refire 0.066
set g_balance_laser_secondary_animtime 0.066
set g_balance_laser_secondary_lifetime 0
+set g_balance_laser_secondary_melee_delay 0.25 // 0.35 was too slow
+set g_balance_laser_secondary_melee_range 120
+set g_balance_laser_secondary_melee_swing_side 120
+set g_balance_laser_secondary_melee_swing_up 30
+set g_balance_laser_secondary_melee_time 0.15
+set g_balance_laser_secondary_melee_traces 10
+set g_balance_laser_secondary_melee_no_doubleslap 1
+set g_balance_laser_secondary_melee_nonplayerdamage 40
+set g_balance_laser_secondary_melee_multihit 1
+set g_balance_laser_secondary_damage 80
set g_balance_laser_secondary_shotangle 0
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_force_zscale 1.25
set g_balance_laser_secondary_refire 0.7
set g_balance_laser_secondary_animtime 0.2
set g_balance_laser_secondary_lifetime 5
+set g_balance_laser_secondary_melee_delay 0.25 // 0.35 was too slow
+set g_balance_laser_secondary_melee_range 120
+set g_balance_laser_secondary_melee_swing_side 120
+set g_balance_laser_secondary_melee_swing_up 30
+set g_balance_laser_secondary_melee_time 0.15
+set g_balance_laser_secondary_melee_traces 10
+set g_balance_laser_secondary_melee_no_doubleslap 1
+set g_balance_laser_secondary_melee_nonplayerdamage 40
+set g_balance_laser_secondary_melee_multihit 1
+set g_balance_laser_secondary_damage 80
set g_balance_laser_secondary_shotangle -90
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_force_zscale 1.25
set g_balance_laser_primary_force_velocitybias 0
set g_balance_laser_primary_force_other_scale 1
set g_balance_laser_secondary 0 // 0 = switch away to last used weapon, 1 = projectile secondary, 2 = gauntlet secondary
-set g_balance_laser_secondary_damage 25
+set g_balance_laser_secondary_damage 80
set g_balance_laser_secondary_edgedamage 12.5
-set g_balance_laser_secondary_force 400
+set g_balance_laser_secondary_force 200
set g_balance_laser_secondary_radius 70
set g_balance_laser_secondary_speed 12000
set g_balance_laser_secondary_spread 0
-set g_balance_laser_secondary_refire 0.7
-set g_balance_laser_secondary_animtime 0.2
+set g_balance_laser_secondary_refire 1.25
+set g_balance_laser_secondary_animtime 1
set g_balance_laser_secondary_lifetime 5
+set g_balance_laser_secondary_melee_delay 0.25 // 0.35 was too slow
+set g_balance_laser_secondary_melee_range 120
+set g_balance_laser_secondary_melee_swing_side 120
+set g_balance_laser_secondary_melee_swing_up 30
+set g_balance_laser_secondary_melee_time 0.15
+set g_balance_laser_secondary_melee_traces 10
+set g_balance_laser_secondary_melee_no_doubleslap 1
+set g_balance_laser_secondary_melee_nonplayerdamage 40
+set g_balance_laser_secondary_melee_multihit 1
+set g_balance_laser_secondary_damage 80
set g_balance_laser_secondary_shotangle -90
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_force_zscale 1.25
void Net_ReadShockwaveParticle()
{
- vector shotorg, shotdir, deviation;
+ vector shotorg, endpos, deviation;
shotorg_x = ReadCoord(); shotorg_y = ReadCoord(); shotorg_z = ReadCoord();
- shotdir_x = ReadCoord(); shotdir_y = ReadCoord(); shotdir_z = ReadCoord();
+ endpos_x = ReadCoord(); endpos_y = ReadCoord(); endpos_z = ReadCoord();
float spread = ReadByte() / 255.0;
float counter, shots = 10;
-
- makevectors(shotdir);
+
+ vector shotdir = normalize(endpos - shotorg);
+ vectorvectors(shotdir);
vector right = v_right;
vector up = v_up;
-
- print("v_right = ", vtos(v_right), ", shotdir = ", vtos(shotdir), ".\n");
for(counter = 0; counter < shots; ++counter)
{
- //ang = M_PI * 2.0 * (0.75 + (counter - 0.5) / shots);
- //deviation = ((shotdir + (right * cos(ang) * 0.075) + (up * sin(ang) * 0.075)) * 1000);
+ // perfect circle effect lines
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 = W_CalculateSpread(shotdir, spread, 1, cvar("g_projectiles_spread_style"));
- //print("deviation = ", vtos(deviation), ".\n");
-
pointparticles(particleeffectnum("laser_shockwave_attack"), shotorg, deviation, 1);
- }
-
- for(counter = 0; counter < shots; ++counter)
- {
- //deviation = '0 0 0';
- //makevectors('0 360 0' * (0.75 + (counter - 0.5) / (shots - 1)));
- //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);
-
+
+ // random "filler" effect lines
deviation = W_CalculateSpread(shotdir, spread, 1, cvar("g_projectiles_spread_style"));
- //print("deviation = ", vtos(deviation), ".\n");
-
- //pointparticles(particleeffectnum("laser_shockwave_attack"), shotorg, deviation * 1000, 1);
+ pointparticles(particleeffectnum("laser_shockwave_attack"), shotorg, deviation * 1000, 1);
+
+ //ang = M_PI * 2.0 * (0.75 + (counter - 0.5) / shots);
+ //deviation = ((shotdir + (right * cos(ang) * 0.075) + (up * sin(ang) * 0.075)) * 1000);
}
-
- //print("definitely doing the effect.\n");
-
- //WarpZone_TrailParticles(world, particleeffectnum("nex_beam"), shotorg, endpos);
}
float autocvar_g_balance_laser_secondary_force_velocitybias;
float autocvar_g_balance_laser_secondary_force_zscale;
float autocvar_g_balance_laser_secondary_lifetime;
+float autocvar_g_balance_laser_secondary_melee_delay;
+float autocvar_g_balance_laser_secondary_melee_range;
+float autocvar_g_balance_laser_secondary_melee_swing_side;
+float autocvar_g_balance_laser_secondary_melee_swing_up;
+float autocvar_g_balance_laser_secondary_melee_time;
+float autocvar_g_balance_laser_secondary_melee_traces;
+float autocvar_g_balance_laser_secondary_melee_no_doubleslap;
+float autocvar_g_balance_laser_secondary_melee_nonplayerdamage;
+float autocvar_g_balance_laser_secondary_melee_multihit;
float autocvar_g_balance_laser_secondary_radius;
float autocvar_g_balance_laser_secondary_refire;
float autocvar_g_balance_laser_secondary_speed;
.float swing_prev;
.entity swing_alreadyhit;
-void SendCSQCShockwaveParticle(float spread)
+void SendCSQCShockwaveParticle(float spread, vector endpos)
{
//WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
WriteCoord(MSG_BROADCAST, w_shotorg_x);
WriteCoord(MSG_BROADCAST, w_shotorg_y);
WriteCoord(MSG_BROADCAST, w_shotorg_z);
- WriteCoord(MSG_BROADCAST, w_shotdir_x);
- WriteCoord(MSG_BROADCAST, w_shotdir_y);
- WriteCoord(MSG_BROADCAST, w_shotdir_z);
+ WriteCoord(MSG_BROADCAST, endpos_x);
+ WriteCoord(MSG_BROADCAST, endpos_y);
+ WriteCoord(MSG_BROADCAST, endpos_z);
WriteByte(MSG_BROADCAST, bound(0, 255 * spread, 255));
}
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);
+ SendCSQCShockwaveParticle(autocvar_g_balance_laser_primary_spread, attack_hitpos);
// did we hit a player directly?
if(aim_ent.takedamage)