Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
plasma_dual.qc
Go to the documentation of this file.
1#include "plasma_dual.qh"
2
3#ifdef SVQC
4
5spawnfunc(turret_plasma_dual)
6{
7 if (!turret_initialize(this, TUR_PLASMA_DUAL))
8 delete(this);
9}
10
11METHOD(DualPlasmaTurret, tr_attack, void(DualPlasmaTurret thistur, entity it))
12{
13 if (!MUTATOR_CALLHOOK(Turret_Plasma_Fire, it, true))
14 SUPER(PlasmaTurret).tr_attack(thistur, it);
15 ++it.tur_head.frame;
16}
17METHOD(DualPlasmaTurret, tr_think, void(DualPlasmaTurret thistur, entity it))
18{
19 if (it.tur_head.frame != 0 && it.tur_head.frame != 3)
20 ++it.tur_head.frame;
21 if (it.tur_head.frame > 6)
22 it.tur_head.frame = 0;
23}
24
25#endif // SVQC
26#ifdef MENUQC
28#include "plasma.qh"
29
30METHOD(DualPlasmaTurret, describe, string(DualPlasmaTurret this))
31{
32 TC(DualPlasmaTurret, this);
34 PAR(_("The %s is a turret that fires electric balls forwards from its two cannons, shooting balls similar to those of the %s."), COLORED_NAME(this), COLORED_NAME(WEP_ELECTRO));
35 PAR(_("It is a stronger version of the %s, which only has one electric ball cannon."), COLORED_NAME(TUR_PLASMA));
36 return PAGE_TEXT;
37}
38
39#endif // MENUQC
#define MUTATOR_CALLHOOK(name,...)
Definition base.qh:186
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define COLORED_NAME(this)
Definition color.qh:189
#define TC(T, sym)
Definition _all.inc:82
#define SUPER(cname)
Definition oo.qh:236
#define METHOD(cname, name, prototype)
Definition oo.qh:274
#define spawnfunc(id)
Definition spawnfunc.qh:107
#define PAGE_TEXT
Definition string.qh:652
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:658
#define PAGE_TEXT_INIT()
Definition string.qh:651
bool turret_initialize(entity this, Turret tur)