set g_balance_nex_velocitydependent_halflife 0
set g_balance_nex_velocitydependent_minspeed 400
set g_balance_nex_velocitydependent_maxspeed 1000
+set g_balance_nex_velocitydependent_falloff_factor 0.001
// }}}
// {{{ minstanex
set g_balance_minstanex_refire 1
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_tracer 0
+set g_balance_campingrifle_primary_tracer 0
set g_balance_campingrifle_primary_damage 60
set g_balance_campingrifle_primary_headshotaddeddamage 100
set g_balance_campingrifle_primary_spread 0
set g_balance_campingrifle_primary_burstcost 0
set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
set g_balance_campingrifle_secondary 1
+set g_balance_campingrifle_secondary_tracer 0
set g_balance_campingrifle_secondary_damage 35
set g_balance_campingrifle_secondary_headshotaddeddamage 15 // 50 damage only on head
set g_balance_campingrifle_secondary_spread 0.008
set g_balance_nex_velocitydependent_halflife 0
set g_balance_nex_velocitydependent_minspeed 400
set g_balance_nex_velocitydependent_maxspeed 1000
+set g_balance_nex_velocitydependent_falloff_factor 0.001
// }}}
// {{{ minstanex
set g_balance_minstanex_refire 1
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_tracer 1
+set g_balance_campingrifle_primary_tracer 0
set g_balance_campingrifle_primary_damage 75
set g_balance_campingrifle_primary_headshotaddeddamage 90
set g_balance_campingrifle_primary_spread 0
set g_balance_campingrifle_primary_burstcost 0 // require same cooldown as secondary, note it's smaller than primary refire time
set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
set g_balance_campingrifle_secondary 1
+set g_balance_campingrifle_secondary_tracer 0
set g_balance_campingrifle_secondary_damage 40
set g_balance_campingrifle_secondary_headshotaddeddamage 20
set g_balance_campingrifle_secondary_spread 0.008
set g_balance_nex_velocitydependent_halflife 0
set g_balance_nex_velocitydependent_minspeed 400
set g_balance_nex_velocitydependent_maxspeed 1000
+set g_balance_nex_velocitydependent_falloff_factor 0.001
// }}}
// {{{ minstanex
set g_balance_minstanex_refire 1
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_tracer 1
+set g_balance_campingrifle_primary_tracer 0
set g_balance_campingrifle_primary_damage 50
set g_balance_campingrifle_primary_headshotaddeddamage 50
set g_balance_campingrifle_primary_spread 0
set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
set g_balance_campingrifle_primary_bullethail 0
set g_balance_campingrifle_secondary 1
+set g_balance_campingrifle_secondary_tracer 0
set g_balance_campingrifle_secondary_damage 15
set g_balance_campingrifle_secondary_headshotaddeddamage 25
set g_balance_campingrifle_secondary_spread 0.02
set g_balance_nex_velocitydependent_halflife 0
set g_balance_nex_velocitydependent_minspeed 400
set g_balance_nex_velocitydependent_maxspeed 1000
+set g_balance_nex_velocitydependent_falloff_factor 0.001
// }}}
// {{{ minstanex
set g_balance_minstanex_refire 1
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_tracer 1
+set g_balance_campingrifle_primary_tracer 0
set g_balance_campingrifle_primary_damage 50
set g_balance_campingrifle_primary_headshotaddeddamage 50
set g_balance_campingrifle_primary_spread 0
set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
set g_balance_campingrifle_primary_bullethail 0
set g_balance_campingrifle_secondary 1
+set g_balance_campingrifle_secondary_tracer 0
set g_balance_campingrifle_secondary_damage 15
set g_balance_campingrifle_secondary_headshotaddeddamage 25
set g_balance_campingrifle_secondary_spread 0.02
// }}}
// {{{ uzi
set g_balance_uzi_first 1
-set g_balance_uzi_first_damage 17
+set g_balance_uzi_first_damage 16
set g_balance_uzi_first_force 35
set g_balance_uzi_first_spread 0.03
set g_balance_uzi_first_refire 0.2
set g_balance_uzi_first_ammo 2
-set g_balance_uzi_sustained_damage 12
+set g_balance_uzi_sustained_damage 9
set g_balance_uzi_sustained_force 7.5
set g_balance_uzi_sustained_spread 0.1
set g_balance_uzi_sustained_refire 0.1
set g_balance_grenadelauncher_secondary_speed_up 225
set g_balance_grenadelauncher_secondary_speed_z 0
set g_balance_grenadelauncher_secondary_spread 0
-set g_balance_grenadelauncher_secondary_lifetime 5
+set g_balance_grenadelauncher_secondary_lifetime 3
set g_balance_grenadelauncher_secondary_lifetime2 0.65
set g_balance_grenadelauncher_secondary_refire 0.8
set g_balance_grenadelauncher_secondary_animtime 0.4
set g_balance_nex_secondary_ammo 5
set g_balance_nex_secondary_damagefalloff_mindist 500
set g_balance_nex_secondary_damagefalloff_maxdist 4500
-set g_balance_nex_secondary_damagefalloff_halflife 2000
-set g_balance_nex_secondary_damagefalloff_forcehalflife 2000
+set g_balance_nex_secondary_damagefalloff_halflife 4000
+set g_balance_nex_secondary_damagefalloff_forcehalflife 4000
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_factor 0.001
// }}}
// {{{ minstanex
set g_balance_minstanex_refire 1.25
set g_balance_campingrifle_reloadtime 2 // matches reload anim
set g_balance_campingrifle_auto_reload_after_changing_weapons 0
set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_tracer 1
+set g_balance_campingrifle_primary_tracer 1
set g_balance_campingrifle_primary_damage 75
set g_balance_campingrifle_primary_headshotaddeddamage 75
set g_balance_campingrifle_primary_spread 0
set g_balance_campingrifle_primary_burstcost 0
set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_damage 25
-set g_balance_campingrifle_secondary_headshotaddeddamage 25 // 50 damage only on head
-set g_balance_campingrifle_secondary_spread 0.008
-set g_balance_campingrifle_secondary_force 1
-set g_balance_campingrifle_secondary_speed 20000
+set g_balance_campingrifle_secondary_tracer 0
+set g_balance_campingrifle_secondary_damage 50
+set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
+set g_balance_campingrifle_secondary_spread 0
+set g_balance_campingrifle_secondary_force 2
+set g_balance_campingrifle_secondary_speed 30000
set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 0.15
-set g_balance_campingrifle_secondary_animtime 0.1
+set g_balance_campingrifle_secondary_refire 1.5
+set g_balance_campingrifle_secondary_animtime 1.4
set g_balance_campingrifle_secondary_ammo 10
set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
set g_balance_campingrifle_secondary_burstcost 0
effect electro_lightning
count 300
type spark
-color 0x501860 0x501860 // 0x202020 0x404040
+// color 0x501860 0x501860 // 0x202020 0x404040
+color 0x2030FF 0x80C0FF
tex 65 65
size 6 6
alpha 100 206 1724
float nex_minvelocity;
float nex_maxvelocity;
+float nex_speed_falloff_factor;
+float nex_speed;
float cr_maxbullets;
case TE_CSQC_NEX_VELOCITY:
nex_minvelocity = ReadShort();
nex_maxvelocity = ReadShort();
+ nex_speed_falloff_factor = ReadShort()/10000;
bHandled = true;
break;
case TE_CSQC_CR_MAXBULLETS:
// the view to go back to normal, so reticle_type would become 0 as we fade out)
if(spectatee_status || getstati(STAT_HEALTH) <= 0)
reticle_type = 0; // prevent reticle from showing during the respawn zoom effect or for spectators
+ else if(activeweapon == WEP_NEX && (button_zoom || zoomscript_caught) || activeweapon == WEP_CAMPINGRIFLE && (button_zoom || zoomscript_caught) || activeweapon == WEP_MINSTANEX && (button_zoom || zoomscript_caught))
+ reticle_type = 2; // nex zoom
else if(button_zoom || zoomscript_caught)
reticle_type = 1; // normal zoom
else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_CAMPINGRIFLE && button_attack2)
float f, a;
wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
+
+ float xyspeed;
+ xyspeed = vlen('1 0 0' * pmove_vel_x + '0 1 0' * pmove_vel_y);
+ if(xyspeed > nex_speed)
+ nex_speed = min(xyspeed, nex_maxvelocity);
+ else
+ nex_speed = (1 - nex_speed_falloff_factor) * nex_speed;
+
// ring around crosshair representing bullets left in camping rifle clip
if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
{
bullets = getstati(STAT_BULLETS_LOADED);
- a = cvar("crosshair_campingrifle_bulletcounter_alpha");
f = bound(0, bullets / cr_maxbullets, 1);
+ 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
{
- float curvel;
- a = cvar("crosshair_nexvelocity_alpha");
- curvel = vlen('1 0 0' * pmove_vel_x + '0 1 0' * pmove_vel_y);
- f = bound(0, (curvel - nex_minvelocity) / (nex_maxvelocity - nex_minvelocity), 1);
+ f = bound(0, (nex_speed - nex_minvelocity) / (nex_maxvelocity - nex_minvelocity), 1);
+ a = cvar("crosshair_nexvelocity_alpha");
DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
}
WriteByte(MSG_ONE, TE_CSQC_NEX_VELOCITY);
WriteShort(MSG_ONE, cvar("g_balance_nex_velocitydependent_minspeed"));
WriteShort(MSG_ONE, cvar("g_balance_nex_velocitydependent_maxspeed"));
+ WriteShort(MSG_ONE, cvar("g_balance_nex_velocitydependent_falloff_factor") * 10000);
}
void send_CSQC_cr_maxbullets(entity e) {
.float multijump_ready;
.float prevjumpbutton;
+.float nexspeed;
+
/*
=============
PlayerJump
}
}
}
+
+ float f;
+ float xyspeed;
+ f = cvar("g_balance_nex_velocitydependent_falloff_factor");
+ xyspeed = vlen('1 0 0' * self.velocity_x + '0 1 0' * self.velocity_y);
+ if(xyspeed > self.nexspeed)
+ self.nexspeed = min(xyspeed, cvar("g_balance_nex_velocitydependent_maxspeed"));
+ else
+ self.nexspeed = (1 - f) * self.nexspeed;
:end
if(self.flags & FL_ONGROUND)
self.lastground = time;
w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
}
- fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (cvar("g_balance_campingrifle_tracer") ? EF_RED : EF_BLUE), 1, pBulletConstant);
+ if(deathtype & HITTYPE_SECONDARY)
+ fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (cvar("g_balance_campingrifle_secondary_tracer") ? EF_RED : EF_BLUE), 1, pBulletConstant);
+ else
+ fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (cvar("g_balance_campingrifle_primary_tracer") ? EF_RED : EF_BLUE), 1, pBulletConstant);
endFireBallisticBullet();
if (cvar("g_casings") >= 2)
float flying;
flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
- f = ExponentialFalloff(cvar("g_balance_nex_velocitydependent_minspeed"), cvar("g_balance_nex_velocitydependent_maxspeed"), cvar("g_balance_nex_velocitydependent_halflife"), vlen('1 0 0' * self.velocity_x + '0 1 0' * self.velocity_y));
+ f = ExponentialFalloff(cvar("g_balance_nex_velocitydependent_minspeed"), cvar("g_balance_nex_velocitydependent_maxspeed"), cvar("g_balance_nex_velocitydependent_halflife"), self.nexspeed);
// TODO: make it more obvious (through effects, indicator on weapon) that damage increases when speed increases
mydmg *= f;