7 spawnfunc(turret_plasma) { if (!turret_initialize(this, TUR_PLASMA)) delete(this); }
9 METHOD(PlasmaTurret, tr_attack, void(PlasmaTurret this, entity it))
13 .entity weaponentity = weaponentities[0]; // TODO: unhardcode
14 FireRailgunBullet (it, weaponentity, it.tur_shotorg, it.tur_shotorg + it.tur_shotdir_updated * max_shot_distance, 10000000000,
15 800, 0, 0, 0, 0, DEATH_TURRET_PLASMA.m_id);
17 Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, it.tur_shotorg, it.tur_shotdir_updated * 1000, 1);
19 // teamcolor / hit beam effect
20 vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
21 WarpZone_TrailParticles(NULL, particleeffectnum(EFFECT_VAPORIZER(it.team)), it.tur_shotorg, v);
25 SUPER(PlasmaTurret).tr_attack(this, it);
27 if (it.tur_head.frame == 0)
28 it.tur_head.frame = 1;
30 METHOD(PlasmaTurret, tr_think, void(PlasmaTurret thistur, entity it))
32 if (it.tur_head.frame != 0)
33 it.tur_head.frame = it.tur_head.frame + 1;
35 if (it.tur_head.frame > 5)
36 it.tur_head.frame = 0;
38 METHOD(PlasmaTurret, tr_setup, void(PlasmaTurret this, entity it))
40 it.ammo_flags = TFL_AMMO_ENERGY | TFL_AMMO_RECHARGE | TFL_AMMO_RECIEVE;
41 it.damage_flags |= TFL_DMG_HEADSHAKE;
42 it.firecheck_flags |= TFL_FIRECHECK_AFF;
43 it.aim_flags = TFL_AIM_LEAD | TFL_AIM_SHOTTIMECOMPENSATE | TFL_AIM_SPLASH;
45 turret_do_updates(it);