Xonotic
plasma_dual.qc
Go to the documentation of this file.
1 #include "plasma_dual.qh"
2 
3 #ifdef SVQC
4 
5 spawnfunc(turret_plasma_dual) { if (!turret_initialize(this, TUR_PLASMA_DUAL)) delete(this); }
6 
7 METHOD(DualPlasmaTurret, tr_attack, void(DualPlasmaTurret thistur, entity it))
8 {
9  if (MUTATOR_IS_ENABLED(mutator_instagib)) {
10  .entity weaponentity = weaponentities[0]; // TODO: unhardcode
11  FireRailgunBullet (it, weaponentity, it.tur_shotorg, it.tur_shotorg + it.tur_shotdir_updated * max_shot_distance, 10000000000, false,
12  800, 0, 0, 0, 0, DEATH_TURRET_PLASMA.m_id);
13 
14 
15  Send_Effect(EFFECT_VORTEX_MUZZLEFLASH, it.tur_shotorg, it.tur_shotdir_updated * 1000, 1);
16 
17  // teamcolor / hit beam effect
19  Send_Effect(EFFECT_VAPORIZER(it.team), it.tur_shotorg, v, 1);
20  } else {
21  SUPER(PlasmaTurret).tr_attack(thistur, it);
22  }
23  it.tur_head.frame += 1;
24 }
25 METHOD(DualPlasmaTurret, tr_think, void(DualPlasmaTurret thistur, entity it))
26 {
27  if ((it.tur_head.frame != 0) && (it.tur_head.frame != 3))
28  it.tur_head.frame = it.tur_head.frame + 1;
29 
30  if (it.tur_head.frame > 6)
31  it.tur_head.frame = 0;
32 }
33 
34 #endif
entity() spawn
bool turret_initialize(entity this, Turret tur)
spawnfunc(info_player_attacker)
Definition: sv_assault.qc:283
#define METHOD(cname, name, prototype)
Definition: oo.qh:257
vector WarpZone_UnTransformOrigin(entity wz, vector v)
Definition: common.qc:535
#define SUPER(cname)
Definition: oo.qh:219
#define MUTATOR_IS_ENABLED(this)
Definition: base.qh:176
vector trace_endpos
Definition: csprogsdefs.qc:37
vector(float skel, float bonenum) _skel_get_boneabs_hidden
entity WarpZone_trace_transform
Definition: common.qh:37
vector v
Definition: ent_cs.qc:116
entity weaponentities[MAX_WEAPONSLOTS]
Definition: weapon.qh:14
void FireRailgunBullet(entity this,.entity weaponentity, vector start, vector end, float bdamage, bool headshot_notify, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype)
Definition: tracing.qc:231
entity EFFECT_VAPORIZER(int teamid)
Definition: all.inc:67