set g_balance_nex_primary_damagefalloff_forcehalflife 0
set g_balance_nex_secondary 0
+set g_balance_nex_secondary_charge 0
+set g_balance_nex_secondary_charge_rate 200
+set g_balance_nex_secondary_charge_ammo 10
set g_balance_nex_secondary_damage 100
set g_balance_nex_secondary_force 600
set g_balance_nex_secondary_refire 1.5
set g_balance_nex_primary_damagefalloff_forcehalflife 9999999
set g_balance_nex_secondary 0
+set g_balance_nex_secondary_charge 0
+set g_balance_nex_secondary_charge_rate 200
+set g_balance_nex_secondary_charge_ammo 10
set g_balance_nex_secondary_damage 80
set g_balance_nex_secondary_force -500
set g_balance_nex_secondary_refire 1.25
set g_balance_nex_primary_damagefalloff_forcehalflife 1500
set g_balance_nex_secondary 0
+set g_balance_nex_secondary_charge 0
+set g_balance_nex_secondary_charge_rate 200
+set g_balance_nex_secondary_charge_ammo 10
set g_balance_nex_secondary_damage 90
set g_balance_nex_secondary_force 200
set g_balance_nex_secondary_refire 1.5
set g_balance_nex_primary_damagefalloff_forcehalflife 1500
set g_balance_nex_secondary 0
+set g_balance_nex_secondary_charge 0
+set g_balance_nex_secondary_charge_rate 200
+set g_balance_nex_secondary_charge_ammo 10
set g_balance_nex_secondary_damage 90
set g_balance_nex_secondary_force 300
set g_balance_nex_secondary_refire 1.5
set g_balance_nex_secondary 1
set g_balance_nex_secondary_charge 1
-set g_balance_nex_secondary_charge_rate 20
-set g_balance_nex_secondary_charge_ammo 20
+set g_balance_nex_secondary_charge_rate 200
+set g_balance_nex_secondary_charge_ammo 10
set g_balance_nex_secondary_damage 125
set g_balance_nex_secondary_force -700
set g_balance_nex_secondary_refire 1
set g_balance_nex_velocitydependent_halflife -500
set g_balance_nex_velocitydependent_minspeed 400
set g_balance_nex_velocitydependent_maxspeed 1000
-set g_balance_nex_velocitydependent_falloff_rate 20
+set g_balance_nex_velocitydependent_falloff_rate 40
// }}}
// {{{ minstanex
set g_balance_minstanex_refire 1.25
float campingrifle_scope;
float nex_scope;
+float nex_velocitydependent;
float nex_minvelocity;
float nex_maxvelocity;
float nex_speed_falloff_rate;
bHandled = true;
break;
case TE_CSQC_NEX_VELOCITY:
+ nex_velocitydependent = ReadByte();
nex_minvelocity = ReadShort();
nex_maxvelocity = ReadShort();
nex_speed_falloff_rate = ReadByte();
a = cvar("crosshair_campingrifle_bulletcounter_alpha");
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
}
- else if (activeweapon == WEP_NEX) // ring around crosshair representing velocity-dependent damage for the nex
+ else if (activeweapon == WEP_NEX && nex_velocitydependent) // ring around crosshair representing velocity-dependent damage for the nex
{
f = bound(0, (nex_speed - nex_minvelocity) / (nex_maxvelocity - nex_minvelocity), 1);
msg_entity = e;
WriteByte(MSG_ONE, SVC_TEMPENTITY);
WriteByte(MSG_ONE, TE_CSQC_NEX_VELOCITY);
+ WriteByte(MSG_ONE, bound(0, fabs(cvar("g_balance_nex_velocitydependent_halflife")), 1));
WriteShort(MSG_ONE, cvar("g_balance_nex_velocitydependent_minspeed"));
WriteShort(MSG_ONE, cvar("g_balance_nex_velocitydependent_maxspeed"));
WriteByte(MSG_ONE, cvar("g_balance_nex_velocitydependent_falloff_rate"));
}
else if (req == WR_THINK)
{
- print(ftos(self.nexspeed), "\n");
if (self.BUTTON_ATCK)
{
if (weapon_prepareattack(0, cvar("g_balance_nex_primary_refire")))
{
if(cvar("g_balance_nex_secondary_charge"))
{
- self.nexspeed = min(cvar("g_balance_nex_velocitydependent_maxspeed"), self.nexspeed + cvar("g_balance_nex_secondary_charge_rate") * frametime / W_TICSPERFRAME);
- self.ammo_cells = max(0, self.ammo_cells - cvar("g_balance_nex_secondary_charge_ammo") * frametime / W_TICSPERFRAME);
+ if(self.ammo_cells)
+ {
+ self.nexspeed = min(cvar("g_balance_nex_velocitydependent_maxspeed"), self.nexspeed + cvar("g_balance_nex_secondary_charge_rate") * frametime / W_TICSPERFRAME);
+ self.ammo_cells = max(0, self.ammo_cells - cvar("g_balance_nex_secondary_charge_ammo") * frametime / W_TICSPERFRAME);
+ }
}
else if(cvar("g_balance_nex_secondary"))
{