19 actor.tur_head = actor;
23 entity beam =
new(PhaserTurret_beam);
28 beam.cnt =
time + actor.shot_speed;
29 beam.shot_spread =
time + 2;
30 beam.nextthink =
time;
32 beam.shot_dmg = actor.shot_dmg / (actor.shot_speed /
frametime);
33 beam.scale = actor.target_range / 256;
35 beam.enemy = actor.enemy;
36 beam.bot_dodge =
true;
38 beam.bot_dodgerating = beam.shot_dmg;
42 beam.attack_finished_single[0] = actor.attack_finished_single[0];
43 actor.attack_finished_single[0] =
time;
45 setattachment(beam, actor.tur_head,
"tag_fire");
49 if (actor.tur_head.frame == 0)
50 actor.tur_head.frame = 1;
59 actor.attack_finished_single[0] =
time + actor.shot_refire;
61 actor.tur_head.frame = 10;
69 if (
time - this.shot_spread > 0)
71 this.shot_spread =
time + 2;
79 actor.tur_shotorg + actor.tur_shotdir_updated * actor.target_range,
80 '-1 -1 -1' * actor.shot_radius,
81 '1 1 1' * actor.shot_radius,
85 DEATH_TURRET_PHASER.m_id);
IntrusiveList g_bot_dodge
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define setmodel(this, m)
void FireImoBeam(entity this, vector start, vector end, vector smin, vector smax, float bforce, float f_dmg, float f_velfactor, int deathtype)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
void set_movetype(entity this, int mt)
#define METHOD(cname, name, prototype)
void beam_think(entity this)
const int CH_SHOTS_SINGLE
#define sound(e, c, s, v, a)
string W_Sound(string w_snd)
void soundat(entity e, vector o, int chan, string samp, float vol, float _atten)
#define SOUND(name, path)
void turret_do_updates(entity t_turret)
updates enemy distances, predicted impact point/time and updated aim<->predict impact distance.
void turret_initparams(entity tur)
#define W_SetupShot_Dir(ent, wepent, s_forward, antilag, recoil, snd, chan, maxdamage, deathtype)
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)