7 float dt, dmg_remaining_next, f;
12 f = this.
dmg_last - dmg_remaining_next;
15 RadiusDamage(
this, this.
realowner, this.
dmg * f, this.
dmg_edge * f, this.
dmg_radius, this.
realowner,
NULL, this.
dmg_force * f, this.
projectiledeathtype, this.
weaponentity_fld,
NULL);
74 entity gren =
new(hookbomb);
75 gren.owner = gren.realowner = actor;
76 gren.bot_dodge =
true;
81 gren.weaponentity_fld = weaponentity;
83 setsize(gren,
'0 0 0',
'0 0 0');
94 gren.damagedbycontents =
true;
100 gren.velocity = gren.velocity + actor.velocity;
105 gren.angles =
'0 0 0';
119 if(!actor.(weaponentity).hook)
121 if(
time > actor.(weaponentity).hook_refire)
145 if(actor.(weaponentity).hook)
155 if(actor.(weaponentity).hook && actor.(weaponentity).hook.state == 1)
157 float hooked_time_max =
WEP_CVAR_PRI(WEP_HOOK, hooked_time_max);
158 if(hooked_time_max > 0)
160 if(
time > actor.(weaponentity).hook_time_hooked + hooked_time_max)
164 float hooked_fuel = thiswep.ammo_factor *
WEP_CVAR_PRI(WEP_HOOK, hooked_ammo);
167 if(
time > actor.(weaponentity).hook_time_fueldecrease)
171 if(
GetResource(actor, RES_FUEL) >= (
time - actor.(weaponentity).hook_time_fueldecrease) * hooked_fuel)
173 W_DecreaseAmmo(thiswep, actor, (
time - actor.(weaponentity).hook_time_fueldecrease) * hooked_fuel, weaponentity);
181 if(actor.(weaponentity).m_weapon != WEP_Null)
198 if (actor.(weaponentity).hook)
206 if (actor.(weaponentity).hook)
221 if(actor.(weaponentity).hook)
246 return WEAPON_HOOK_MURDER;
287 Draw_CylindricLine(hit, start, 8,
Draw_GrapplingHook_trace_callback_tex, 0.25,
Draw_GrapplingHook_trace_callback_rnd,
Draw_GrapplingHook_trace_callback_rgb,
min(1,
Draw_GrapplingHook_trace_callback_a - i),
DRAWFLAG_NORMAL, vorg);
330 case NUM_TEAM_1: tex =
"particles/hook_red"; rgb =
'1 0.3 0.3';
break;
331 case NUM_TEAM_2: tex =
"particles/hook_blue"; rgb =
'0.3 0.3 1';
break;
332 case NUM_TEAM_3: tex =
"particles/hook_yellow"; rgb =
'1 1 0.3';
break;
333 case NUM_TEAM_4: tex =
"particles/hook_pink"; rgb =
'1 0.3 1';
break;
378 this.HookSilent = (sf & 0x80);
397 setorigin(
this, this.
origin);
430 PAR(_(
"The %s is a unique weapon, firing a chain forwards which pulls you in once it latches onto something."),
COLORED_NAME(
this));
431 PAR(_(
"The secondary fire usually drops a gravity bomb that affects enemies, also releasing light and smoke sort of like a flashbang."));
432 PAR(_(
"It usually requires %s ammo to work, consuming it both when initially firing the hook, and after a couple seconds as it reels you in."),
COLORED_NAME(ITEM_Fuel));
433 PAR(_(
"The %s allows reaching previously unreachable places on maps and zooming around the map at high speeds, "
434 "making both surprise ambushes and miraculous escapes possible."),
COLORED_NAME(
this));
435 PAR(_(
"It isn't available very often on maps, unless the %s mutator is active, in which all players have it on their offhand, used with %s."),
COLORED_NAME(MUTATOR_hook),
strcat(
"^3", _(
"hook"),
"^7"));
IntrusiveList g_bot_dodge
#define MUTATOR_CALLHOOK(id,...)
#define BITSET(var, mask, flag)
int W_GunAlign(entity this, int preferred_align)
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.
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
vector hook_shotorigin[4]
#define COLORED_NAME(this)
const int IT_UNLIMITED_AMMO
#define setmodel(this, m)
#define PHYS_INPUT_BUTTON_CROUCH(s)
float W_WeaponRateFactor(entity this)
void Draw_GrapplingHook(entity this)
void W_Hook_Explode2(entity this)
void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
string Draw_GrapplingHook_trace_callback_tex
void W_Hook_Explode2_use(entity this, entity actor, entity trigger)
float Draw_GrapplingHook_trace_callback_a
void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end)
void Remove_GrapplingHook(entity this)
vector Draw_GrapplingHook_trace_callback_rgb
float autocvar_cl_grapplehook_alpha
void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg)
void W_Hook_ExplodeThink(entity this)
float Draw_GrapplingHook_trace_callback_rnd
void W_Hook_Attack2(Weapon thiswep, entity actor,.entity weaponentity)
void W_Hook_Touch2(entity this, entity toucher)
float hook_time_fueldecrease
const float DRAWFLAG_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
void W_SwitchWeapon_Force(Player this, Weapon w,.entity weaponentity)
const int HITTYPE_SECONDARY
#define pointparticles(effect, org, vel, howmany)
vector entcs_GetColor(int i)
int entcs_GetTeamColor(int i)
void InterpolateOrigin_Undo(entity this)
snap origin to iorigin2 (actual origin)
void InterpolateOrigin_Note(entity this)
void InterpolateOrigin_Do(entity this)
set origin based on iorigin1 (old pos), iorigin2 (desired pos), and time
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define NET_HANDLE(id, param)
void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end, float nomonsters, entity forent, entity zone, WarpZone_trace_callback_t cb)
vector WarpZone_TransformOrigin(entity wz, vector v)
entity WarpZone_trace_transform
void set_movetype(entity this, int mt)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
entity Notification
always last
#define METHOD(cname, name, prototype)
const int PROJECTILE_HOOKBOMB
float health
Legacy fields for the resources. To be removed.
#define w_getbestweapon(ent, wepent)
void RemoveHook(entity this)
void RemoveGrapplingHooks(entity pl)
void FireGrapplingHook(entity actor,.entity weaponentity)
const float HOOK_WAITING_FOR_RELEASE
bool autocvar_g_balance_grapplehook_crouchslide
const float HOOK_REMOVING
float autocvar_g_balance_grapplehook_refire
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)
const int CH_SHOTS_SINGLE
#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...
float autocvar_g_balance_pause_fuel_regen
int autocvar_g_projectiles_newton_style
#define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
int autocvar_chase_active
entity viewmodels[MAX_WEAPONSLOTS]
string W_Guide_Keybinds(Weapon wep)
string W_Guide_DPS_onlySecondary(string name, string sec)
#define WEP_CVAR_PRI(wep, name)
#define WEP_CVAR_SEC(wep, name)
const int MAX_WEAPONSLOTS
entity weaponentities[MAX_WEAPONSLOTS]
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
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)