10 RadiusDamage(
this, this.
realowner,
WEP_CVAR_PRI(WEP_HAGAR, damage),
WEP_CVAR_PRI(WEP_HAGAR, edgedamage),
WEP_CVAR_PRI(WEP_HAGAR,
radius),
NULL,
NULL,
WEP_CVAR_PRI(WEP_HAGAR, force), this.
projectiledeathtype, this.
weaponentity_fld, directhitentity);
23 RadiusDamage(
this, this.
realowner,
WEP_CVAR_SEC(WEP_HAGAR, damage),
WEP_CVAR_SEC(WEP_HAGAR, edgedamage),
WEP_CVAR_SEC(WEP_HAGAR,
radius),
NULL,
NULL,
WEP_CVAR_SEC(WEP_HAGAR, force), this.
projectiledeathtype, this.
weaponentity_fld, directhitentity);
38 float is_linkexplode = ( ((inflictor.owner !=
NULL) ? (inflictor.owner == this.
owner) :
true)
43 is_linkexplode = (is_linkexplode &&
WEP_CVAR_SEC(WEP_HAGAR, load_linkexplode));
88 missile =
new(missile);
89 missile.owner = missile.realowner = actor;
90 missile.bot_dodge =
true;
91 missile.bot_dodgerating =
WEP_CVAR_PRI(WEP_HAGAR, damage);
97 missile.damagedbycontents =
true;
105 missile.projectiledeathtype = thiswep.
m_id;
106 missile.weaponentity_fld = weaponentity;
108 setsize(missile,
'0 0 0',
'0 0 0');
134 missile =
new(missile);
135 missile.owner = missile.realowner = actor;
136 missile.bot_dodge =
true;
137 missile.bot_dodgerating =
WEP_CVAR_SEC(WEP_HAGAR, damage);
143 missile.damagedbycontents =
true;
153 missile.weaponentity_fld = weaponentity;
155 setsize(missile,
'0 0 0',
'0 0 0');
177 float counter, shots, spread_pershot;
179 vector forward, right, up;
181 if(!actor.(weaponentity).hagar_load)
195 for(counter = 0; counter < shots; ++counter)
197 missile =
new(missile);
198 missile.owner = missile.realowner = actor;
199 missile.bot_dodge =
true;
200 missile.bot_dodgerating =
WEP_CVAR_SEC(WEP_HAGAR, damage);
206 missile.damagedbycontents =
true;
215 missile.weaponentity_fld = weaponentity;
217 setsize(missile,
'0 0 0',
'0 0 0');
222 spread_pershot = ((shots - 1) / (
WEP_CVAR_SEC(WEP_HAGAR, load_max) - 1));
223 spread_pershot = (1 - (spread_pershot *
WEP_CVAR_SEC(WEP_HAGAR, load_spread_bias)));
260 else if(autocvar_g_balance_hagar_reload_ammo)
265 bool stopped = loaded || !enough_ammo;
271 if(actor.(weaponentity).hagar_load)
291 if(!actor.(weaponentity).hagar_loadblock && actor.(weaponentity).hagar_loadstep <
time)
298 if(actor.(weaponentity).hagar_load >=
WEP_CVAR_SEC(WEP_HAGAR, load_max))
304 if(stopped && !actor.(weaponentity).hagar_loadbeep && actor.(weaponentity).hagar_load)
313 else if(actor.(weaponentity).hagar_loadblock)
319 if(actor.(weaponentity).hagar_load)
322 if(stopped && actor.(weaponentity).hagar_loadstep - 0.5 <
time &&
WEP_CVAR_SEC(WEP_HAGAR, load_hold) >= 0)
324 if(!actor.(weaponentity).hagar_warning)
357 if(!(fire & 1) || actor.(weaponentity).hagar_load || actor.(weaponentity).hagar_loadblock || actor.(weaponentity).m_switchweapon != thiswep || !
weapon_prepareattack_check(thiswep, actor, weaponentity,
false, -1))
359 w_ready(thiswep, actor, weaponentity, fire);
367 w_ready(thiswep, actor, weaponentity, fire);
374 actor.(weaponentity).
wframe = WFRAME_FIRE1;
388 float loadable_secondary;
391 if(loadable_secondary)
394 thiswep.wr_reload(thiswep, actor, weaponentity);
396 else if((fire & 1) && !actor.(weaponentity).hagar_load && !actor.(weaponentity).hagar_loadblock)
401 else if((fire & 2) && !loadable_secondary &&
WEP_CVAR(WEP_HAGAR, secondary))
414 if(actor.(weaponentity).hagar_load)
424 if(actor.(weaponentity).hagar_load)
457 if(actor.(weaponentity).hagar_load &&
WEP_CVAR_SEC(WEP_HAGAR, load_releasedeath))
463 if(!actor.(weaponentity).hagar_load)
469 return WEAPON_HAGAR_SUICIDE;
475 return WEAPON_HAGAR_MURDER_BURST;
477 return WEAPON_HAGAR_MURDER_SPRAY;
499 PAR(_(
"The %s rapidly fires small propelled rockets forwards, dealing some splash damage on impact."),
COLORED_NAME(
this));
500 PAR(_(
"When the secondary fire is held, multiple rockets are loaded up, and they're shot at the same time when released. "
501 "These rockets can't be held forever, so it will fire itself after some time (after a warning beep) if the secondary fire isn't released."));
502 PAR(_(
"It consumes %s ammo for each rocket."),
COLORED_NAME(ITEM_Rockets));
503 PAR(_(
"The %s works best over close to medium ranges, since it's hard to land hits at a long distance. "
504 "A common usage is fully loading the secondary fire before turning a corner, so you can surprise any enemies around the corner with a bunch of rockets to the face."),
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,...)
vector W_CalculateSpreadPattern(int pattern, float bias, int counter, int total)
float autocvar_g_weaponspreadfactor
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...
Resource ammo_type
M: ammotype : main ammo type.
virtual void wr_checkammo2()
(SERVER) checks ammo for weapon second
virtual void wr_checkammo1()
(SERVER) checks ammo for weapon primary
#define COLORED_NAME(this)
const int IT_UNLIMITED_AMMO
#define PHYS_INPUT_BUTTON_ATCK(s)
#define PHYS_INPUT_BUTTON_ATCK2(s)
float W_WeaponRateFactor(entity this)
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
void W_SwitchWeapon_Force(Player this, Weapon w,.entity weaponentity)
const int HITTYPE_SECONDARY
#define pointparticles(effect, org, vel, howmany)
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
void W_Hagar_Explode_use(entity this, entity actor, entity trigger)
void W_Hagar_Attack2(Weapon thiswep, entity actor,.entity weaponentity)
void W_Hagar_Attack_Auto(Weapon thiswep, entity actor,.entity weaponentity, int fire)
void W_Hagar_Attack(Weapon thiswep, entity actor,.entity weaponentity)
void W_Hagar_Attack2_Load_Release(Weapon thiswep, entity actor,.entity weaponentity)
void W_Hagar_Explode2_use(entity this, entity actor, entity trigger)
void W_Hagar_Explode(entity this, entity directhitentity)
void W_Hagar_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
void W_Hagar_Touch2(entity this, entity toucher)
void W_Hagar_Attack2_Load(Weapon thiswep, entity actor,.entity weaponentity)
void W_Hagar_Explode2(entity this, entity directhitentity)
void W_Hagar_Touch(entity this, entity toucher)
Sound SND_HAGEXP_RANDOM(float rnd)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
void set_movetype(entity this, int mt)
const int MOVETYPE_BOUNCEMISSILE
entity Notification
always last
#define METHOD(cname, name, prototype)
const int PROJECTILE_HAGAR
const int PROJECTILE_HAGAR_BOUNCING
float health
Legacy fields for the resources. To be removed.
void W_SwitchToOtherWeapon(entity this,.entity weaponentity)
#define w_getbestweapon(ent, wepent)
const float TIMEOUT_ACTIVE
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
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)
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute)
#define W_SetupProjVelocity_SEC(ent, wep)
#define W_SetupProjVelocity_PRI(ent, wep)
#define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype)
string W_Guide_Keybinds(Weapon wep)
string W_Guide_DPS_secondaryMultishot(string name, string pri, string sec, string shots, string refire2, bool sec_variable)
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
#define WEP_CVAR_PRI(wep, name)
#define WEP_CVAR(wep, name)
#define WEP_CVAR_SEC(wep, name)
const int MAX_WEAPONSLOTS
const int WS_READY
idle frame
entity weaponentities[MAX_WEAPONSLOTS]
const int WS_INUSE
fire state
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)
bool weaponUseForbidden(entity player)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
void weapon_prepareattack_do(entity actor,.entity weaponentity, bool secondary, float attacktime)
bool weapon_prepareattack_check(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
#define ATTACK_FINISHED(ent, w)
float weapon_load[REGISTRY_MAX(Weapons)]