11 this.move_time =
time;
16 this.
scale = (
WEP_CVAR(WEP_ELECTRO, combo_radius) * 0.05) * myscale;
23 setsize(e,
'-4 -4 -4',
'4 4 4');
25 setorigin(e, e.origin);
32 e.avelocity =
'7 0 11';
43 Net_Accept(Electro_Orb);
45 setorigin(
this, this.
origin);
58 WriteVector(channel, this.
origin);
73 for (; e; e = e.chain)
74 if (e.classname ==
"electro_orb")
82 if (
WEP_CVAR(WEP_ELECTRO, combo_comboradius_thruwall))
85 if (
vdist(e.WarpZone_findradius_dist, >,
WEP_CVAR(WEP_ELECTRO, combo_comboradius_thruwall)))
99 e.classname =
"electro_orb_chain";
106 ?
vlen(e.WarpZone_findradius_dist) /
WEP_CVAR(WEP_ELECTRO, combo_speed)
125 WEP_CVAR(WEP_ELECTRO, combo_radius),
140 newproj.solid = this.
solid;
141 setorigin(newproj, this.
origin);
142 setmodel(newproj, MDL_PROJECTILE_ELECTRO);
143 setsize(newproj, this.
mins, this.
maxs);
144 newproj.owner = this.
owner;
150 newproj.nextthink =
time;
151 newproj.ltime =
time +
WEP_CVAR(WEP_ELECTRO, combo_duration);
155 newproj.SendFlags = 0xFFFFFF;
169 if (
WEP_CVAR(WEP_ELECTRO, combo_duration))
178 WEP_CVAR(WEP_ELECTRO, combo_damage),
179 WEP_CVAR(WEP_ELECTRO, combo_edgedamage),
180 WEP_CVAR(WEP_ELECTRO, combo_radius),
185 this.weaponentity_fld,
264 for (; e; e = e.chain)
265 if (e.classname ==
"electro_orb")
273 if (this.
owner == e.owner)
276 explode =
WEP_CVAR_PRI(WEP_ELECTRO, midaircombo_teammate);
285 e.classname =
"electro_orb_chain";
293 ?
vlen(e.WarpZone_findradius_dist) /
WEP_CVAR_PRI(WEP_ELECTRO, midaircombo_speed)
302 if (found &&
WEP_CVAR_PRI(WEP_ELECTRO, midaircombo_explode))
331 entity proj =
new(electro_bolt);
332 proj.owner = proj.realowner = actor;
333 proj.bot_dodge =
true;
334 proj.bot_dodgerating =
WEP_CVAR_PRI(WEP_ELECTRO, damage);
337 proj.nextthink =
time;
340 proj.projectiledeathtype = thiswep.
m_id;
341 proj.weaponentity_fld = weaponentity;
349 setsize(proj,
'0 0 -3',
'0 0 -3');
401 newproj.owner = this.
owner;
404 setorigin(newproj, this.
origin);
405 setmodel(newproj, MDL_PROJECTILE_ELECTRO);
406 setsize(newproj, this.
mins, this.
maxs);
408 newproj.traileffectnum = _particleeffectnum(EFFECT_TR_NEXUIZPLASMA.eent_eff_name);
415 newproj.event_damage = this.event_damage;
417 newproj.damagedbycontents =
true;
429 newproj.use = this.
use;
430 newproj.flags = this.
flags;
445 newproj.nextthink =
time;
450 newproj.nextthink = newproj.death_time;
459 else if (
toucher.owner !=
this.owner &&
toucher.classname !=
this.classname)
481 float is_combo = (inflictor.classname ==
"electro_orb_chain" || inflictor.classname ==
"electro_bolt");
532 entity proj =
new(electro_orb);
533 proj.owner = proj.realowner = actor;
536 proj.bot_dodge =
true;
537 proj.bot_dodgerating =
WEP_CVAR_SEC(WEP_ELECTRO, damage);
542 proj.weaponentity_fld = weaponentity;
550 setsize(proj,
'-4 -4 -4',
'4 4 4');
559 if (proj.damagedbycontents)
581 if (actor.(weaponentity).electro_count > 1
591 w_ready(thiswep, actor, weaponentity, fire);
599 if (
vdist(actor.origin - actor.enemy.origin, >, 1000))
600 actor.bot_secondary_electromooth =
false;
601 if (!actor.bot_secondary_electromooth)
605 :
bot_aim(actor, weaponentity, 1000000, 0, 0.001,
false,
true);
611 actor.bot_secondary_electromooth =
true;
620 actor.bot_secondary_electromooth =
false;
627 if (autocvar_g_balance_electro_reload_ammo)
629 float ammo_amount = 0;
637 thiswep.wr_reload(thiswep, actor, weaponentity);
674 if (
WEP_CVAR(WEP_ELECTRO, combo_safeammocheck))
695 return WEAPON_ELECTRO_SUICIDE_ORBS;
697 return WEAPON_ELECTRO_SUICIDE_BOLT;
704 return WEAPON_ELECTRO_MURDER_ORBS;
709 return WEAPON_ELECTRO_MURDER_COMBO;
711 return WEAPON_ELECTRO_MURDER_BOLT;
754 PAR(_(
"The %s shoots electric balls forwards, dealing some splash damage when they burst on impact."),
COLORED_NAME(
this));
755 PAR(_(
"The secondary fire launches orbs that are influenced by gravity, "
756 "so they can be laid around the map at high traffic locations (like at %s flag bases) to damage enemies that walk by. "
757 "The orbs burst after some time, and can be forced to burst in a \"combo\" if a primary fire ball bursts near them."),
COLORED_NAME(MAPINFO_TYPE_CTF));
758 PAR(_(
"It consumes some %s ammo for each ball / orb."),
COLORED_NAME(ITEM_Cells));
759 PAR(_(
"The %s is one of the best spam weapons to use in crowded areas, since combos can deal tons of damage, if the enemy is close enough. "
760 "Since the primary fire doesn't travel particularly fast, the %s is not useful in many other situations."),
COLORED_NAME(
this),
COLORED_NAME(
this));
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity, bool shot_accurate)
IntrusiveList g_bot_dodge
#define MUTATOR_CALLHOOK(id,...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
IntrusiveList g_drawables
#define COLORED_NAME(this)
#define setmodel(this, m)
bool IsFlying(entity this)
#define PHYS_INPUT_TIMELENGTH
#define PHYS_INPUT_BUTTON_ATCK(s)
#define PHYS_INPUT_BUTTON_ATCK2(s)
float W_WeaponRateFactor(entity this)
void SetMovetypeFollow(entity ent, entity e)
int LostMovetypeFollow(entity ent)
const float MOVE_NOMONSTERS
vector trace_plane_normal
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
IntrusiveList g_damagedbycontents
const int HITTYPE_SECONDARY
#define pointparticles(effect, org, vel, howmany)
void W_Electro_TouchExplode(entity this, entity toucher)
void electro_orb_draw(entity this)
void W_Electro_Explode_use(entity this, entity actor, entity trigger)
void W_Electro_Attack_Bolt(Weapon thiswep, entity actor,.entity weaponentity)
void W_Electro_Orb_ExplodeOverTime(entity this)
void W_Electro_Orb_Touch(entity this, entity toucher)
bool electro_orb_send(entity this, entity to, int sf)
void W_Electro_Bolt_Think(entity this)
void W_Electro_Explode(entity this, entity directhitentity)
bool bot_secondary_electromooth
void W_Electro_ExplodeComboThink(entity this)
void W_Electro_Attack_Orb(Weapon thiswep, entity actor,.entity weaponentity)
void electro_orb_setup(entity e)
void W_Electro_Orb_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
void W_Electro_CheckAttack(Weapon thiswep, entity actor,.entity weaponentity, int fire)
void W_Electro_Orb_Follow_Think(entity this)
void W_Electro_Orb_Stick(entity this, entity to)
void W_Electro_TriggerCombo(vector org, float rad, entity own)
void W_Electro_ExplodeCombo(entity this)
IntrusiveList LimitedElectroBallRubbleList
float electro_secondarytime
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
ERASEABLE bool IL_CONTAINS(IntrusiveList this, entity it)
#define NET_HANDLE(id, param)
#define WriteHeader(to, id)
#define REGISTER_NET_LINKED(id)
void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc)
entity WarpZone_FindRadius(vector org, float rad, bool needlineofsight)
void WarpZone_TraceLine(vector org, vector end, float nomonsters, entity forent)
void set_movetype(entity this, int mt)
const int MOVETYPE_FOLLOW
const int MOVETYPE_BOUNCE
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
entity Notification
always last
#define METHOD(cname, name, prototype)
const int PROJECTILE_ELECTRO
const int PROJECTILE_ELECTRO_BEAM
float health
Legacy fields for the resources. To be removed.
void LimitedChildrenRubble(IntrusiveList list, string cname, int limit, void(entity) deleteproc, entity parent)
entity ListNewChildRubble(IntrusiveList list, entity child)
entity ReplaceOldListedChildRubble(IntrusiveList list, entity child, entity oldChild)
#define IS_INDEPENDENT_PLAYER(e)
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
void adaptor_think2use_hittype_splash(entity this)
#define PROJECTILE_TOUCH(e, t)
IntrusiveList g_projectiles
#define PROJECTILE_MAKETRIGGER(e)
#define sound(e, c, s, v, a)
float spamsound(entity e, int chan, Sound samp, float vol, float _atten)
use this one if you might be causing spam (e.g.
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
#define W_SetupProjVelocity_PRI(ent, wep)
#define W_SetupProjVelocity_UP_SEC(ent, wep)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
string W_Guide_Keybinds(Weapon wep)
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
string W_Guide_DPS_secondaryMultishotWithCombo(string name, string pri, string sec, string shots, string refire2, string combo, bool sec_variable)
#define WEP_CVAR_PRI(wep, name)
#define WEP_CVAR(wep, name)
#define WEP_CVAR_SEC(wep, name)
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)]