19 actor.tur_head = actor;
23 float d = actor.shot_dmg;
24 float r = actor.target_range;
26 setorigin(e, actor.tur_shotorg);
38 actor.attack_finished_single[0] =
time + actor.shot_refire;
39 for (
int i = 0; i < 10; ++i)
43 t =
toast(actor, t, r, d);
59 float r = turret_validate_target(actor, it, actor.target_validate_flags);
62 traceline(from.origin, 0.5 * (it.absmin + it.absmax), MOVE_WORLDONLY, from);
63 if (trace_fraction == 1.0)
65 float d = vlen(it.origin - from.origin);
78 if (etarget != actor.realowner)
79 Damage(etarget, actor, actor,
81 DEATH_TURRET_TESLA.m_id,
86 etarget.railgunhit =
true;
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
#define IL_CLEAR(this)
Remove all elements.
#define FOREACH_ENTITY_RADIUS(org, dist, cond, body)
void te_csqc_lightningarc(vector from, vector to)
#define METHOD(cname, name, prototype)
string W_Sound(string w_snd)
#define SOUND(name, path)
void turret_initparams(entity tur)
entity toast(entity actor, entity from, float range, float damage)
IntrusiveList g_railgunhit
#define W_SetupShot_Dir(ent, wepent, s_forward, antilag, recoil, snd, chan, maxdamage, deathtype)
const int TFL_TARGETSELECT_TEAMCHECK
don't attack teammates
const int TFL_TARGETSELECT_PLAYERS
target players
const int TFL_TARGETSELECT_RANGELIMITS
limit target selection range
const int TFL_TARGETSELECT_MISSILES
target projectiles
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)