9 if (!
WEP_CVAR(WEP_VORTEX, charge))
return '0 0 0';
11 float animlimit =
WEP_CVAR(WEP_VORTEX, charge_animlimit);
12 float f =
min(1, charge / animlimit);
14 vector g = f * (mycolors * 0.3);
15 if (charge > animlimit)
17 f = (charge - animlimit) / (1 - animlimit);
18 g += f * (mycolors * 0.7);
48NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE,
bool isNew)
60 charge =
sqrt(charge);
93 if(!
WEP_CVAR(WEP_VORTEX, charge) || !
WEP_CVAR(WEP_VORTEX, charge_velocity_rate))
100 if (player.(weaponentity).m_weapon == WEP_VORTEX &&
WEP_CVAR(WEP_VORTEX, charge) &&
WEP_CVAR(WEP_VORTEX, charge_velocity_rate) &&
vdist(
vec2(player.velocity), >,
WEP_CVAR(WEP_VORTEX, charge_minspeed)))
102 float xyspeed =
vlen(
vec2(player.velocity));
104 xyspeed =
min(xyspeed,
WEP_CVAR(WEP_VORTEX, charge_maxspeed));
105 float f = (xyspeed -
WEP_CVAR(WEP_VORTEX, charge_minspeed)) / (
WEP_CVAR(WEP_VORTEX, charge_maxspeed) -
WEP_CVAR(WEP_VORTEX, charge_minspeed));
114 float mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, myammo, charge;
118 mymindist =
WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, damagefalloff_mindist);
119 mymaxdist =
WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, damagefalloff_maxdist);
120 myhalflife =
WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, damagefalloff_halflife);
121 myforcehalflife =
WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, damagefalloff_forcehalflife);
124 float dtype = thiswep.
m_id;
133 charge =
WEP_CVAR(WEP_VORTEX, charge_mindmg) / mydmg + (1 -
WEP_CVAR(WEP_VORTEX, charge_mindmg) / mydmg) * actor.(weaponentity).vortex_charge;
144 if(charge >
WEP_CVAR(WEP_VORTEX, charge_animlimit) &&
WEP_CVAR(WEP_VORTEX, charge_animlimit))
151 FireRailgunBullet(actor, weaponentity,
w_shotorg,
w_shotorg +
w_shotdir *
max_shot_distance, mydmg,
false, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, dtype);
175 if(
WEP_CVAR(WEP_VORTEX, charge) && actor.(weaponentity).vortex_charge <
WEP_CVAR(WEP_VORTEX, charge_limit))
176 actor.(weaponentity).
vortex_charge =
min(1, actor.(weaponentity).vortex_charge +
WEP_CVAR(WEP_VORTEX, charge_rate) * dt);
181 if(
bot_aim(actor, weaponentity, 1000000, 0, 1,
false,
true))
186 if(!
WEP_CVAR(WEP_VORTEX, charge_always))
190 if(actor.(weaponentity).vortex_chargepool_ammo < 1)
192 if(actor.vortex_chargepool_pauseregen_finished <
time)
194 actor.pauseregen_finished =
max(actor.pauseregen_finished,
time +
WEP_CVAR_SEC(WEP_VORTEX, chargepool_pause_regen));
198 thiswep.wr_reload(thiswep, actor, weaponentity);
216 if(actor.(weaponentity).vortex_charge < 1)
225 dt =
min(dt, (1 - actor.(weaponentity).vortex_charge) /
WEP_CVAR(WEP_VORTEX, charge_rate));
226 actor.vortex_chargepool_pauseregen_finished =
time +
WEP_CVAR_SEC(WEP_VORTEX, chargepool_pause_regen);
227 dt =
min(dt, actor.(weaponentity).vortex_chargepool_ammo);
238 dt =
min(dt, (1 - actor.(weaponentity).vortex_charge) /
WEP_CVAR(WEP_VORTEX, charge_rate));
242 if(autocvar_g_balance_vortex_reload_ammo)
268 dt =
min(dt, (1 - actor.(weaponentity).vortex_charge) /
WEP_CVAR(WEP_VORTEX, charge_rate));
273 else if(
WEP_CVAR(WEP_VORTEX, secondary))
286 actor.vortex_lasthit = 0;
291 ammo_amount += (autocvar_g_balance_vortex_reload_ammo && actor.(weaponentity).(weapon_load[thiswep.m_id]) >=
WEP_CVAR_PRI(WEP_VORTEX,
ammo));
320 actor.vortex_lasthit = 0;
328 return WEAPON_THINKING_WITH_PORTALS;
332 return WEAPON_VORTEX_MURDER;
384 PAR(_(
"The %s fires harmful beams of energy that traverse the map instantaneously and deal a significant chunk of damage on impact."),
COLORED_NAME(
this));
385 PAR(_(
"The secondary fire zooms in when held, allowing for ease of aiming."));
386 PAR(_(
"It consumes %s ammo for each shot."),
COLORED_NAME(ITEM_Cells));
387 PAR(_(
"Unlike the %s, the %s doesn't need to be reloaded manually, although you have to wait a couple seconds between shots. "
388 "Uniquely, it can be fired slightly before it finishes completely reloading, albeit with the tradeoff of dealing slightly less damage."),
COLORED_NAME(WEP_RIFLE),
COLORED_NAME(
this));
389 PAR(_(
"Similar to the %s, the %s can be used at any range, but it stands out at long ranges."),
COLORED_NAME(WEP_RIFLE),
COLORED_NAME(
this));
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity, bool shot_accurate)
#define MUTATOR_CALLHOOK(id,...)
#define REGISTER_MUTATOR(...)
#define MUTATOR_HOOKFUNCTION(...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
#define colormapPaletteColor(c, isPants)
#define COLORED_NAME(this)
const int IT_UNLIMITED_AMMO
bool IsFlying(entity this)
#define PHYS_INPUT_TIMELENGTH
#define PHYS_INPUT_BUTTON_ZOOMSCRIPT(s)
#define PHYS_INPUT_BUTTON_ATCK(s)
#define PHYS_INPUT_BUTTON_ZOOM(s)
#define PHYS_INPUT_BUTTON_ATCK2(s)
bool autocvar_cl_reticle_weapon
vector particles_colormin
vector particles_colormax
const int HITTYPE_ARMORPIERCE
#define particleeffectnum(e)
int entcs_GetClientColors(int i)
#define NET_HANDLE(id, param)
#define WriteHeader(to, id)
#define REGISTER_NET_TEMP(id)
void WarpZone_TrailParticles_WithMultiplier(entity own, float eff, vector org, vector end, float f, int boxflags)
vector WarpZone_UnTransformOrigin(entity wz, vector v)
entity WarpZone_trace_transform
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
entity Notification
always last
#define METHOD(cname, name, prototype)
void GetPressedKeys(entity this)
#define sound(e, c, s, v, a)
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
void FireRailgunBullet(entity this,.entity weaponentity, vector start, vector end, float bdamage, bool headshot_notify, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype)
#define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
void W_Vortex_Attack(Weapon thiswep, entity actor,.entity weaponentity, float issecondary)
void SendCSQCVortexBeamParticle(entity player, float charge)
vector vortex_glowcolor(int actor_colors, float charge)
void W_Vortex_Charge(entity actor,.entity weaponentity, float dt)
float vortex_chargepool_pauseregen_finished
float vortex_charge_rottime
bool autocvar_cl_particles_oldvortexbeam
string W_Guide_Keybinds(Weapon wep)
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
string W_Guide_DPS_onlyOne(string name, string fire)
#define WEP_CVAR_PRI(wep, name)
#define WEP_CVAR_BOTH(wep, isprimary, name)
#define WEP_CVAR(wep, name)
#define WEP_CVAR_SEC(wep, name)
const int MAX_WEAPONSLOTS
entity weaponentities[MAX_WEAPONSLOTS]
int autocvar_cl_tracers_teamcolor
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
void W_Reload(entity actor,.entity weaponentity, float sent_ammo_min, Sound sent_sound)
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
float weapon_load[REGISTRY_MAX(Weapons)]
float vortex_chargepool_ammo