set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0
set g_balance_laser_primary_gauntlet 0
+set g_balance_laser_primary_force_zscale 1
+set g_balance_laser_primary_force_velocitybias 0
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 35
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_shotangle 0
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_force_zscale 0
+set g_balance_laser_secondary_force_zscale 1
+set g_balance_laser_secondary_force_velocitybias 0
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 6
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0.03
set g_balance_laser_primary_gauntlet 0
+set g_balance_laser_primary_force_zscale 1
+set g_balance_laser_primary_force_velocitybias 0
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 25
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_shotangle -90
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_force_zscale 0
+set g_balance_laser_secondary_force_zscale 1
+set g_balance_laser_secondary_force_velocitybias 0
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 5
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0.03
set g_balance_laser_primary_gauntlet 0
+set g_balance_laser_primary_force_zscale 1
+set g_balance_laser_primary_force_velocitybias 0
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 35
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_shotangle 0
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_force_zscale 0
+set g_balance_laser_secondary_force_zscale 1
+set g_balance_laser_secondary_force_velocitybias 0
// }}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 6
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0.03
set g_balance_laser_primary_gauntlet 0
+set g_balance_laser_primary_force_zscale 1
+set g_balance_laser_primary_force_velocitybias 0
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 25
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_shotangle -90
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_force_zscale 0
+set g_balance_laser_secondary_force_zscale 1
+set g_balance_laser_secondary_force_velocitybias 0
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 6
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0
set g_balance_laser_primary_gauntlet 0
+set g_balance_laser_primary_force_zscale 1
+set g_balance_laser_primary_force_velocitybias 0.25
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 35
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_shotangle 0
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_force_zscale 0
+set g_balance_laser_secondary_force_zscale 1
+set g_balance_laser_secondary_force_velocitybias 0.25
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 10
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0
set g_balance_laser_primary_gauntlet 0
+set g_balance_laser_primary_zscale 1.25
+set g_balance_laser_primary_velocitybias 0
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 200 // dps
set g_balance_laser_secondary_edgedamage 0
set g_balance_laser_secondary_shotangle 0
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_gauntlet 1
-set g_balance_laser_force_zscale 1.25
+set g_balance_laser_secondary_zscale 1.25
+set g_balance_laser_secondary_velocitybias 0
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 20
set g_balance_laser_primary_shotangle 0
set g_balance_laser_primary_delay 0
set g_balance_laser_primary_gauntlet 0
+set g_balance_laser_primary_force_zscale 1
+set g_balance_laser_primary_force_velocitybias 0
set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
set g_balance_laser_secondary_damage 35
set g_balance_laser_secondary_edgedamage 10
set g_balance_laser_secondary_shotangle 0
set g_balance_laser_secondary_delay 0
set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_force_zscale 0
+set g_balance_laser_secondary_force_zscale 1
+set g_balance_laser_secondary_force_velocitybias 0
// }}}
// {{{ shotgun
set g_balance_shotgun_primary_bullets 10
a = bound(0, tfloorforce + (1-tfloorforce) * hitratio, 1);
force = force * a;
- if(deathtype == WEP_LASER && cvar("g_balance_laser_force_zscale")) // scale laser push force on the z-axis
- force_z = force_z * cvar("g_balance_laser_force_zscale");
+ // laser force adjustments :P
+ if(DEATH_WEAPONOF(deathtype) == WEP_LASER)
+ {
+ vector vel;
+
+ float force_zscale;
+ float force_velocitybiasramp;
+ float force_velocitybias;
+
+ force_velocitybiasramp = cvar("sv_maxspeed");
+ if(deathtype & HITTYPE_SECONDARY)
+ {
+ force_zscale = cvar("g_balance_laser_secondary_force_zscale");
+ force_velocitybias = cvar("g_balance_laser_secondary_force_velocitybias");
+ }
+ else
+ {
+ force_zscale = cvar("g_balance_laser_primary_force_zscale");
+ force_velocitybias = cvar("g_balance_laser_primary_force_velocitybias");
+ }
+
+ vel = targ.velocity;
+ vel_z = 0;
+ vel = normalize(vel) * bound(0, vlen(vel) / force_velocitybiasramp, 1) * force_velocitybias;
+ force =
+ vlen(force)
+ *
+ normalize(normalize(force) + vel);
+
+ force_z *= force_zscale;
+ }
//if (targ == attacker)
//{