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';
47 setorigin(
this, this.
origin);
63 WriteVector(channel, this.
origin);
82 if(e.classname ==
"electro_orb")
92 if(
WEP_CVAR(WEP_ELECTRO, combo_comboradius_thruwall))
95 if(
vdist(e.WarpZone_findradius_dist, >,
WEP_CVAR(WEP_ELECTRO, combo_comboradius_thruwall)))
110 e.classname =
"electro_orb_chain";
117 if (
WEP_CVAR(WEP_ELECTRO, combo_speed))
138 RadiusDamage(
this, this.
realowner, damage, edgedamage,
WEP_CVAR(WEP_ELECTRO, combo_radius),
NULL,
NULL, 0, this.
projectiledeathtype, this.
weaponentity_fld,
NULL);
146 newproj.solid = this.
solid;
147 setorigin(newproj, this.
origin);
148 setmodel(newproj, MDL_PROJECTILE_ELECTRO);
149 setsize(newproj, this.
mins, this.
maxs);
150 newproj.owner = this.
owner;
156 newproj.nextthink =
time;
157 newproj.ltime =
time +
WEP_CVAR(WEP_ELECTRO, combo_duration);
161 newproj.SendFlags |= 1;
175 if(
WEP_CVAR(WEP_ELECTRO, combo_duration))
186 WEP_CVAR(WEP_ELECTRO, combo_damage),
187 WEP_CVAR(WEP_ELECTRO, combo_edgedamage),
188 WEP_CVAR(WEP_ELECTRO, combo_radius),
193 this.weaponentity_fld,
282 if(e.classname ==
"electro_orb")
292 if (this.
owner == e.owner)
298 explode =
WEP_CVAR_PRI(WEP_ELECTRO, midaircombo_teammate);
310 e.classname =
"electro_orb_chain";
329 if(found &&
WEP_CVAR_PRI(WEP_ELECTRO, midaircombo_explode))
359 proj =
new(electro_bolt);
360 proj.owner = proj.realowner = actor;
361 proj.bot_dodge =
true;
362 proj.bot_dodgerating =
WEP_CVAR_PRI(WEP_ELECTRO, damage);
365 proj.nextthink =
time;
368 proj.projectiledeathtype = thiswep.
m_id;
369 proj.weaponentity_fld = weaponentity;
377 setsize(proj,
'0 0 -3',
'0 0 -3');
429 newproj.owner = this.
owner;
432 setorigin(newproj, this.
origin);
433 setmodel(newproj, MDL_PROJECTILE_ELECTRO);
434 setsize(newproj, this.
mins, this.
maxs);
436 newproj.traileffectnum = _particleeffectnum(EFFECT_TR_NEXUIZPLASMA.eent_eff_name);
443 newproj.event_damage = this.event_damage;
445 newproj.damagedbycontents =
true;
457 newproj.use = this.
use;
458 newproj.flags = this.
flags;
475 newproj.nextthink =
time;
480 newproj.nextthink = newproj.death_time;
491 else if(
toucher.owner !=
this.owner &&
toucher.classname !=
this.classname)
513 float is_combo = (inflictor.classname ==
"electro_orb_chain" || inflictor.classname ==
"electro_bolt");
564 entity proj =
new(electro_orb);
565 proj.owner = proj.realowner = actor;
568 proj.bot_dodge =
true;
569 proj.bot_dodgerating =
WEP_CVAR_SEC(WEP_ELECTRO, damage);
574 proj.weaponentity_fld = weaponentity;
582 setsize(proj,
'-4 -4 -4',
'4 4 4');
591 if(proj.damagedbycontents)
613 if(actor.(weaponentity).electro_count > 1)
623 w_ready(thiswep, actor, weaponentity, fire);
631 if(
vdist(actor.origin - actor.enemy.origin, >, 1000)) { actor.bot_secondary_electromooth = 0; }
632 if(actor.bot_secondary_electromooth == 0)
639 shoot =
bot_aim(actor, weaponentity, 1000000, 0, 0.001,
false,
true);
644 if(
random() < 0.01) actor.bot_secondary_electromooth = 1;
652 if(
random() < 0.03) actor.bot_secondary_electromooth = 0;
659 if(autocvar_g_balance_electro_reload_ammo)
661 float ammo_amount = 0;
669 thiswep.wr_reload(thiswep, actor, weaponentity);
706 if(
WEP_CVAR(WEP_ELECTRO, combo_safeammocheck))
727 return WEAPON_ELECTRO_SUICIDE_ORBS;
729 return WEAPON_ELECTRO_SUICIDE_BOLT;
736 return WEAPON_ELECTRO_MURDER_ORBS;
741 return WEAPON_ELECTRO_MURDER_COMBO;
743 return WEAPON_ELECTRO_MURDER_BOLT;
786 PAR(_(
"The %s shoots electric balls forwards, dealing some splash damage when they burst on impact."),
COLORED_NAME(
this));
787 PAR(_(
"The secondary fire launches orbs that are influenced by gravity, "
788 "so they can be laid around the map at high traffic locations (like at %s flag bases) to damage enemies that walk by. "
789 "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));
790 PAR(_(
"It consumes some %s ammo for each ball / orb."),
COLORED_NAME(ITEM_Cells));
791 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. "
792 "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)
float 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 Net_Accept(classname)
#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)]