Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
PhaserTurret Class Reference
Inheritance diagram for PhaserTurret:
Collaboration diagram for PhaserTurret:

Public Member Functions

 ATTRIB (Turret, head_model, string)
 full name of tur_head model
 ATTRIB (Turret, m_icon, string)
 icon
 ATTRIB (Turret, m_weapon, Weapon)
 ATTRIB (Turret, mdl, string)
 currently a copy of the model
 ATTRIB (Turret, model, string)
 full name of model
 ATTRIB (Turret, netname, string)
 short name
virtual void describe ()
virtual void display ()
virtual void tr_attack ()
 (SERVER) called when turret attacks
virtual void tr_config ()
 (SERVER) dump turret cvars to config in data directory (see: sv_cmd dumpturrets)
virtual void tr_death ()
 (SERVER) called when turret dies
virtual void tr_precache ()
 (BOTH) precaches models/sounds used by this turret
virtual void tr_setup ()
 (BOTH) setup turret data
virtual void tr_think ()
 (SERVER) logic to run every frame

Public Attributes

string head_model = strcat("models/turrets/", "phaser.md3")
vector m_color = '1 1 1'
 color
int m_id = 0
vector m_maxs = '32 32 64'
vector m_mins = '-32 -32 0'
string m_name = _("Phaser Cannon")
Weapon m_weapon = WEP_PHASER
string mdl = "base.md3"
string model = strcat("models/turrets/", this.mdl)
string netname = "phaser"
int spawnflags = TUR_FLAG_SNIPER | TUR_FLAG_HITSCAN | TUR_FLAG_PLAYER

Detailed Description

Definition at line 5 of file phaser.qh.

Member Function Documentation

◆ ATTRIB() [1/6]

Turret::ATTRIB ( Turret ,
head_model ,
string  )
inherited

full name of tur_head model

References ATTRIB().

◆ ATTRIB() [2/6]

Turret::ATTRIB ( Turret ,
m_icon ,
string  )
inherited

icon

References ATTRIB().

Referenced by ATTRIB(), ATTRIB(), ATTRIB(), ATTRIB(), and ATTRIB().

◆ ATTRIB() [3/6]

Turret::ATTRIB ( Turret ,
m_weapon ,
Weapon  )
inherited

References m_weapon.

◆ ATTRIB() [4/6]

Turret::ATTRIB ( Turret ,
mdl ,
string  )
inherited

currently a copy of the model

References ATTRIB(), and mdl.

◆ ATTRIB() [5/6]

Turret::ATTRIB ( Turret ,
model ,
string  )
inherited

full name of model

References ATTRIB(), and model.

◆ ATTRIB() [6/6]

Turret::ATTRIB ( Turret ,
netname ,
string  )
inherited

short name

References ATTRIB(), and netname.

◆ describe()

virtual void Turret::describe ( )
inlinevirtualinherited

Definition at line 61 of file turret.qh.

62 {
63 TC(Turret, this);
64 return SUPER(Turret).describe(this);
65 }
#define TC(T, sym)
Definition _all.inc:82
#define SUPER(cname)
Definition oo.qh:231

References describe(), SUPER, and TC.

Referenced by describe().

◆ display()

virtual void Turret::display ( )
inlinevirtualinherited

Definition at line 66 of file turret.qh.

67 {
68 TC(Turret, this);
69 returns(this.m_name, icon_path_from_HUDskin(this.m_icon));
70 }
string m_name
human readable name
Definition turret.qh:16

References display(), m_name, name, and TC.

Referenced by display().

◆ tr_attack()

virtual void Turret::tr_attack ( )
inlinevirtualinherited

(SERVER) called when turret attacks

Definition at line 51 of file turret.qh.

51 {
52 Weapon w = this.m_weapon;
53 .entity weaponentity = weaponentities[0];
54 w.wr_think(w, it, weaponentity, 1);
55 }
virtual void wr_think()
(SERVER) logic to run every frame
Definition weapon.qh:90
entity weaponentities[MAX_WEAPONSLOTS]
Definition weapon.qh:17
Weapon m_weapon
Definition wepent.qh:26

References entity(), m_weapon, tr_attack(), weaponentities, and Weapon::wr_think().

Referenced by tr_attack(), and turret_fire().

◆ tr_config()

virtual void Turret::tr_config ( )
inlinevirtualinherited

(SERVER) dump turret cvars to config in data directory (see: sv_cmd dumpturrets)

Definition at line 58 of file turret.qh.

58{ }

References tr_config().

Referenced by tr_config().

◆ tr_death()

virtual void Turret::tr_death ( )
inlinevirtualinherited

(SERVER) called when turret dies

Definition at line 41 of file turret.qh.

41 {
42
43 }

References entity(), and tr_death().

Referenced by tr_death(), and turret_die().

◆ tr_precache()

virtual void Turret::tr_precache ( )
inlinevirtualinherited

(BOTH) precaches models/sounds used by this turret

Definition at line 45 of file turret.qh.

45 {
46
47 }

References tr_precache().

Referenced by tr_precache(), and turret_initialize().

◆ tr_setup()

virtual void Turret::tr_setup ( )
inlinevirtualinherited

(BOTH) setup turret data

Definition at line 33 of file turret.qh.

33 {
34
35 }

References entity(), METHOD, this, and tr_setup().

Referenced by load_unit_settings(), tr_setup(), turret_initialize(), and turret_respawn().

◆ tr_think()

virtual void Turret::tr_think ( )
inlinevirtualinherited

(SERVER) logic to run every frame

Definition at line 37 of file turret.qh.

37 {
38
39 }

References entity(), and tr_think().

Referenced by tr_think(), turret_think(), and turrets_manager_think().

Member Data Documentation

◆ head_model

string PhaserTurret::head_model = strcat("models/turrets/", "phaser.md3")

Definition at line 11 of file phaser.qh.

◆ m_color

vector Turret::m_color = '1 1 1'
inherited

color

Definition at line 18 of file turret.qh.

◆ m_id

int Turret::m_id = 0
inherited

Definition at line 9 of file turret.qh.

Referenced by turret_initialize().

◆ m_maxs

vector PhaserTurret::m_maxs = '32 32 64'

Definition at line 8 of file phaser.qh.

◆ m_mins

vector PhaserTurret::m_mins = '-32 -32 0'

Definition at line 7 of file phaser.qh.

◆ m_name

string PhaserTurret::m_name = _("Phaser Cannon")

Definition at line 13 of file phaser.qh.

◆ m_weapon

Weapon PhaserTurret::m_weapon = WEP_PHASER

Definition at line 14 of file phaser.qh.

◆ mdl

string PhaserTurret::mdl = "base.md3"

Definition at line 9 of file phaser.qh.

◆ model

string PhaserTurret::model = strcat("models/turrets/", this.mdl)

Definition at line 10 of file phaser.qh.

◆ netname

string PhaserTurret::netname = "phaser"

Definition at line 12 of file phaser.qh.

◆ spawnflags

int PhaserTurret::spawnflags = TUR_FLAG_SNIPER | TUR_FLAG_HITSCAN | TUR_FLAG_PLAYER

Definition at line 6 of file phaser.qh.


The documentation for this class was generated from the following file: