]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
FINALLY fix the effect -- plus, add the proper cvars back into the configs
authorSamual Lenks <samual@xonotic.org>
Mon, 23 Jul 2012 16:49:37 +0000 (12:49 -0400)
committerSamual Lenks <samual@xonotic.org>
Mon, 23 Jul 2012 16:49:37 +0000 (12:49 -0400)
balance25.cfg
balanceFruitieX.cfg
balanceXPM.cfg
balanceXonotic.cfg
qcsrc/client/particles.qc
qcsrc/server/autocvars.qh
qcsrc/server/w_laser.qc

index 7e6c6065ad5073b36a42d35a3611282adad85af6..151372fed5a52816b6f8a644db921f33e21665a9 100644 (file)
@@ -259,6 +259,16 @@ set g_balance_laser_secondary_spread 0
 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
index f875a4add6a61e1b1cecce72898822bfeae79e84..32f61143a9b5c2857b7dae1b9916a05dba8b3cee 100644 (file)
@@ -259,6 +259,16 @@ set g_balance_laser_secondary_spread 0
 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
index 1c91562ba6f1629cff3df45a83f94bc376acc518..22e1ae54676862be6cbd3c13b3f0097ea590dbb8 100644 (file)
@@ -259,6 +259,16 @@ 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_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
index c65ab0c757a18ed4a81e5528b1b8398507b3d175..5b7aa66c47cf0ac5fee5baca7443e2f38d90d248 100644 (file)
@@ -250,15 +250,25 @@ set g_balance_laser_primary_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
index 6fbe398baa17966ddab733eb24ea0181964fac4a..10bda1289d5f8315e6bb8420b6fe8bece526a0f3 100644 (file)
@@ -304,55 +304,35 @@ void Net_ReadNexgunBeamParticle()
 
 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);
 }
 
index 6a9e05dbda460a597926413aa27ec917b7651dad..1043183a05b27366204bb2c0bb8e0c083d2a62b9 100644 (file)
@@ -457,6 +457,15 @@ float autocvar_g_balance_laser_secondary_force_other_scale;
 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;
index 6419b99c118d0896861bb6b974023486b447c4dc..81bb5b528250ac4994fdd4452eb3245a88995e26 100644 (file)
@@ -7,7 +7,7 @@ void() W_LastWeapon;
 .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);
@@ -15,9 +15,9 @@ void SendCSQCShockwaveParticle(float spread)
        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));
 }
 
@@ -119,7 +119,7 @@ void W_Laser_Shockwave (void)
        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)