4 void beam_think(
entity this);
14 turret_initparams(actor);
18 actor.tur_head = actor;
22 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 / beam.ticrate);
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;
54 void beam_think(
entity this)
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;
78 FireImoBeam ( actor, actor.tur_shotorg,
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);
#define WEP_CVAR_PRI(wepname, name)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
string W_Sound(string w_snd)
#define METHOD(cname, name, prototype)
void turret_do_updates(entity e_turret)
updates aim org, shot org, shot dir and enemy org for selected turret
IntrusiveList g_bot_dodge
#define setmodel(this, m)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
#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)
const int CH_SHOTS_SINGLE
#define sound(e, c, s, v, a)
#define SOUND(name, path)
void set_movetype(entity this, int mt)