38 if(!pl.(weaponentity))
40 if(pl.(weaponentity).hook)
41 delete(pl.(weaponentity).hook);
53 if(player.(weaponentity).hook ==
this)
111 if(this.
realowner.(weaponentity).hook !=
this)
113 error(
"Owner lost the hook!\n");
141 float velocity_multiplier = 1;
142 MUTATOR_CALLHOOK(GrappleHookThink,
this, tarzan, pull_entity, velocity_multiplier);
145 velocity_multiplier =
M_ARGV(3,
float);
177 dir = (dist ?
dir * (1 / dist) :
'0 0 0');
189 if(newlength < dist - ropestretch)
191 newlength = dist - ropestretch;
210 v = v * (1 -
frametime * ropeairfriction);
220 if((frozen_pulling && target_isfrozen) || !frozen_pulling)
227 if(this.
aiment.classname ==
"nade")
250 dist =
vlen(end - myorg);
252 spd = dist * (pullspeed / 200);
322 if(actor.vehicle)
return;
324 int s =
W_GunAlign(actor.(weaponentity),
STAT(GUNALIGN, actor)) - 1;
329 actor.(weaponentity).
movedir = oldmovedir;
332 missile.owner = missile.realowner = actor;
333 actor.(weaponentity).
hook = missile;
334 missile.weaponentity_fld = weaponentity;
336 missile.classname =
"grapplinghook";
345 setsize (missile,
'-3 -3 -3',
'3 3 3');
357 missile.nextthink =
time;
364 missile.damageforcescale = 0;
366 if(missile.damagedbycontents)
369 missile.hook_start = missile.hook_end = missile.origin;
IntrusiveList g_bot_dodge
#define MUTATOR_CALLHOOK(id,...)
int W_GunAlign(entity this, int preferred_align)
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...
virtual void wr_init()
(BOTH) precaches models/sounds used by this weapon, also sets up weapon properties
vector hook_shotorigin[4]
#define PHYS_INPUT_BUTTON_CHAT(s)
void SetMovetypeFollow(entity ent, entity e)
int LostMovetypeFollow(entity ent)
void UpdateCSQCProjectile(entity e)
IntrusiveList g_damagedbycontents
float autocvar_g_maxpushtime
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define WriteHeader(to, id)
void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc)
vector WarpZone_RefSys_TransformVelocity(entity from, entity to, vector vel)
void WarpZone_RefSys_BeginAddingIncrementally(entity me, entity ref)
void WarpZone_RefSys_AddIncrementally(entity me, entity ref)
entity WarpZone_RefSys_SpawnSameRefSys(entity me)
vector WarpZone_RefSys_TransformOrigin(entity from, entity to, vector org)
void set_movetype(entity this, int mt)
const int MOVETYPE_FOLLOW
#define UNSET_ONGROUND(s)
#define round_handler_IsActive()
#define round_handler_IsRoundStarted()
void GrapplingHook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
bool GrapplingHookSend(entity this, entity to, int sf)
void RemoveHook(entity this)
void GrapplingHook_Stop(entity this)
void RemoveGrapplingHooks(entity pl)
void GrapplingHookReset(entity this)
void GrapplingHookTouch(entity this, entity toucher)
int autocvar_g_grappling_hook_tarzan
void GrapplingHookThink(entity this)
void FireGrapplingHook(entity actor,.entity weaponentity)
const float HOOK_RELEASING
float autocvar_g_balance_grapplehook_speed_fly
float autocvar_g_balance_grapplehook_force_rubber
float autocvar_g_balance_grapplehook_health
float autocvar_g_balance_grapplehook_damagedbycontents
int autocvar_g_balance_grapplehook_pull_frozen
float autocvar_g_balance_grapplehook_airfriction
float autocvar_g_balance_grapplehook_force_rubber_overstretch
float autocvar_g_balance_grapplehook_length_min
float autocvar_g_balance_grapplehook_speed_pull
float autocvar_g_balance_grapplehook_nade_time
bool autocvar_g_balance_grapplehook_gravity
float autocvar_g_balance_grapplehook_stretch
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
#define PROJECTILE_TOUCH(e, t)
IntrusiveList g_projectiles
#define PROJECTILE_MAKETRIGGER(e)
#define sound(e, c, s, v, a)
bool sound_allowed(int to, entity e)
#define PRECACHE(func)
directly after STATIC_INIT_LATE
bool StatusEffects_active(StatusEffect this, entity actor)
void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute)
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
vector shotorg_adjust(vector vecs, bool y_is_right, bool visual, int algn)
const int MAX_WEAPONSLOTS
entity weaponentities[MAX_WEAPONSLOTS]
int weaponslot(.entity weaponentity)
vector CL_Weapon_GetShotOrg(int wpn)
bool weaponLocked(entity player)