set g_balance_nex_charge_start 0
set g_balance_nex_charge_rate 0.1
set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_rot_rate 0
set g_balance_nex_charge_shot_multiplier 0.5
set g_balance_nex_charge_velocity_rate 0.2
set g_balance_nex_charge_minspeed 400
set g_balance_nex_charge_start 0
set g_balance_nex_charge_rate 0.1
set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_rot_rate 0
set g_balance_nex_charge_shot_multiplier 0.5
set g_balance_nex_charge_velocity_rate 0.2
set g_balance_nex_charge_minspeed 400
set g_balance_nex_charge_start 0
set g_balance_nex_charge_rate 0.1
set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_rot_rate 0
set g_balance_nex_charge_shot_multiplier 0.5
set g_balance_nex_charge_velocity_rate 0.2
set g_balance_nex_charge_minspeed 400
set g_balance_nex_charge_start 0
set g_balance_nex_charge_rate 0.1
set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_rot_rate 0
set g_balance_nex_charge_shot_multiplier 0.5
set g_balance_nex_charge_velocity_rate 0.2
set g_balance_nex_charge_minspeed 400
set g_balance_nex_charge_start 0
set g_balance_nex_charge_rate 0.35
set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_rot_rate 0
set g_balance_nex_charge_shot_multiplier 0
set g_balance_nex_charge_velocity_rate 0
set g_balance_nex_charge_minspeed 400
set g_balance_nex_charge_start 0.2
set g_balance_nex_charge_rate 0.05
set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_rot_rate 0.01
set g_balance_nex_charge_shot_multiplier 0.675
set g_balance_nex_charge_velocity_rate 0.15
set g_balance_nex_charge_minspeed 400
set g_balance_nex_charge_start 0
set g_balance_nex_charge_rate 0.35
set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_rot_rate 0
set g_balance_nex_charge_shot_multiplier 0
set g_balance_nex_charge_velocity_rate 0
set g_balance_nex_charge_minspeed 400
seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
seta crosshair_ring_size 2 "bullet counter ring size for Rifle, velocity ring for Nex"
seta crosshair_campingrifle_bulletcounter_alpha 0.15
+
seta crosshair_nexvelocity_alpha 0.15
-seta crosshair_nexvelocity_scale 30
-seta crosshair_nexvelocity_currentcharge_rate 0.05
+seta crosshair_nexvelocity_currentcharge_scale 30
seta crosshair_nexvelocity_currentcharge_alpha 0.15
seta crosshair_nexvelocity_currentcharge_color_red 0.8
seta crosshair_nexvelocity_currentcharge_color_green 0
seta crosshair_nexvelocity_currentcharge_color_blue 0
+seta crosshair_nexvelocity_currentcharge_movingavg_rate 0.05
+
seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)"
seta cl_reticle_item_nex 1 "draw aiming recticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha"
seta cl_reticle_item_normal 1 "draw recticle when zooming with the zoom button, 0 disables and values between 0 and 1 change alpha"
entity nightvision_noise, nightvision_noise2;
float pickup_crosshair_time, pickup_crosshair_size;
-float nex_charge_change, nex_charge_current_avg;
+float nex_charge_movingavg, nex_charge_current_avg;
void CSQC_UpdateView(float w, float h)
{
vector rgb;
// indicate how much we're charging right now with an inner circle
a = cvar("crosshair_nexvelocity_currentcharge_alpha");
- nex_charge_change = (1 - cvar("crosshair_nexvelocity_currentcharge_rate")) * nex_charge_change + cvar("crosshair_nexvelocity_currentcharge_rate") * nex_charge;
- nex_charge_current_avg = cvar("crosshair_nexvelocity_currentcharge_rate") * nex_charge_current_avg + (1 - cvar("crosshair_nexvelocity_currentcharge_rate")) * nex_charge_change;
+ nex_charge_movingavg = (1 - cvar("crosshair_nexvelocity_currentcharge_movingavg_rate")) * nex_charge_movingavg + cvar("crosshair_nexvelocity_currentcharge_movingavg_rate") * nex_charge;
rgb = eX * cvar("crosshair_nexvelocity_currentcharge_color_red") + eY * cvar("crosshair_nexvelocity_currentcharge_color_green") + eZ * cvar("crosshair_nexvelocity_currentcharge_color_blue");
- DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_nexvelocity_scale") * (nex_charge - nex_charge_current_avg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+ DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_nexvelocity_currentcharge_scale") * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
// draw the charge
a = cvar("crosshair_nexvelocity_alpha");
}
player_regen();
+
+ // rot nex charge to the charge limit
+ if(cvar("g_balance_nex_charge_rot_rate") && self.nex_charge > cvar("g_balance_nex_charge_limit"))
+ self.nex_charge = bound(cvar("g_balance_nex_charge_limit"), self.nex_charge - cvar("g_balance_nex_charge_rot_rate") * frametime / W_TICSPERFRAME, 1);
+
if(frametime)
player_anim();
if(cvar("g_balance_nex_charge"))
{
charge = cvar("g_balance_nex_charge_mindmg") / mydmg + (1 - cvar("g_balance_nex_charge_mindmg") / mydmg) * self.nex_charge;
- self.nex_charge *= cvar("g_balance_nex_charge_shot_multiplier"); // do this AFTER setting mydmg/myforce
+ self.nex_charge = self.nex_charge * cvar("g_balance_nex_charge_shot_multiplier"); // do this AFTER setting mydmg/myforce
}
else
charge = 1;
- mydmg *= charge;
- myforce *= charge;
+ mydmg = mydmg * charge;
+ myforce = myforce * charge;
W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", mydmg);
{
if(cvar("g_balance_nex_charge") && self.nex_charge < cvar("g_balance_nex_charge_limit"))
self.nex_charge = min(1, self.nex_charge + cvar("g_balance_nex_charge_rate") * frametime / W_TICSPERFRAME);
+
if (self.BUTTON_ATCK)
{
if (weapon_prepareattack(0, cvar("g_balance_nex_primary_refire")))