6 SOUND(TeslaCoilTurretAttack_FIRE,
W_Sound(
"electro_fire"));
12 turret_initparams(actor);
16 actor.tur_head = actor;
20 float d = actor.shot_dmg;
21 float r = actor.target_range;
27 entity t = toast(actor, e,r,d);
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;
55 FOREACH_ENTITY_RADIUS(from.origin, range, it != from && !it.railgunhit,
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);
75 te_csqc_lightningarc(from.origin, etarget.origin);
76 Damage(etarget, actor, actor, damage, DEATH_TURRET_TESLA.m_id,
DMG_NOWEP, etarget.origin,
'0 0 0');
77 etarget.railgunhit =
true;
#define WEP_CVAR_PRI(wepname, name)
#define IL_EACH(this, cond, body)
#define IL_CLEAR(this)
Remove all elements.
IntrusiveList g_railgunhit
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
string W_Sound(string w_snd)
#define METHOD(cname, name, prototype)
const int TFL_TARGETSELECT_PLAYERS
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
#define W_SetupShot_Dir(ent, wepent, s_forward, antilag, recoil, snd, chan, maxdamage, deathtype)
const int TFL_TARGETSELECT_TEAMCHECK
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
const int TFL_TARGETSELECT_MISSILES
#define SOUND(name, path)
const int TFL_TARGETSELECT_RANGELIMITS