16 actor.tur_head = actor;
20 float d = actor.shot_dmg;
21 float r = actor.target_range;
23 setorigin(e, actor.tur_shotorg);
30 if (t ==
NULL)
return;
34 actor.attack_finished_single[0] =
time + actor.shot_refire;
35 for (
int i = 0; i < 10; ++i) {
38 t =
toast(actor, t, r, d);
45 it.railgunhit = false;
57 float r = turret_validate_target(actor, it, actor.target_validate_flags);
60 traceline(from.origin, 0.5 * (it.absmin + it.absmax), MOVE_WORLDONLY, from);
61 if(trace_fraction == 1.0)
63 float d = vlen(it.origin - from.origin);
76 if (etarget != actor.realowner)
77 Damage(etarget, actor, actor, damage, DEATH_TURRET_TESLA.m_id,
DMG_NOWEP, etarget.origin,
'0 0 0');
78 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
const int TFL_TARGETSELECT_PLAYERS
const int TFL_TARGETSELECT_RANGELIMITS
const int TFL_TARGETSELECT_MISSILES
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)