add some jitter to the beam length to make it look more electric :)
authorFruitieX <rasse@rasse-lappy.localdomain>
Mon, 5 Jul 2010 16:17:43 +0000 (19:17 +0300)
committerFruitieX <rasse@rasse-lappy.localdomain>
Mon, 5 Jul 2010 16:17:43 +0000 (19:17 +0300)
balanceFruit.cfg
qcsrc/server/w_electro.qc

index 1aa436e..a591ae3 100644 (file)
@@ -303,9 +303,10 @@ set g_balance_grenadelauncher_secondary_bouncestop 0.075
 // }}}
 // {{{ electro // TODO
 set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 2,
+set g_balance_electro_primary_damage 2
 set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 30
+set g_balance_electro_primary_force 13
+set g_balance_electro_primary_force_up 100
 set g_balance_electro_primary_radius 850
 set g_balance_electro_primary_comboradius 0
 set g_balance_electro_primary_speed 0
index b95d07e..32f8528 100644 (file)
@@ -219,10 +219,10 @@ void lgbeam_think()
     if(trace_fraction < 1)
     {
        Damage (trace_ent, self.owner, self.owner, cvar("g_balance_electro_primary_damage"), WEP_ELECTRO, trace_endpos, force);
-       trace_ent.velocity = trace_ent.velocity * cvar("g_balance_electro_primary_velocityfactor");
+       trace_ent.velocity = trace_ent.velocity * cvar("g_balance_electro_primary_velocityfactor") + '0 0 1' * cvar("g_balance_electro_primary_force_up");
     }
 
-    self.scale = vlen(self.owner.origin - trace_endpos) / 256;
+    self.scale = vlen(self.owner.origin - trace_endpos) / 256 * (0.75 + 0.75 * random());
 }
 
 // experimental lightning gun