Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
machinegun.qc
Go to the documentation of this file.
1#include "machinegun.qh"
2
3#ifdef SVQC
4
5spawnfunc(turret_machinegun)
6{
7 if (!turret_initialize(this, TUR_MACHINEGUN))
8 delete(this);
9}
10
11METHOD(MachineGunTurret, tr_setup, void(MachineGunTurret this, entity it))
12{
13 it.damage_flags |= TFL_DMG_HEADSHAKE;
17 it.turret_flags |= TUR_FLAG_HITSCAN;
18}
19
20#endif // SVQC
21#ifdef MENUQC
23
24METHOD(MachineGunTurret, describe, string(MachineGunTurret this))
25{
26 TC(MachineGunTurret, this);
28 PAR(_("As the name suggests, the %s fires bullets in a burst at its targets, similar to the %s."), COLORED_NAME(this), COLORED_NAME(WEP_MACHINEGUN));
29 return PAGE_TEXT;
30}
31
32#endif // MENUQC
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define COLORED_NAME(this)
Definition color.qh:195
#define TC(T, sym)
Definition _all.inc:82
#define METHOD(cname, name, prototype)
Definition oo.qh:269
#define spawnfunc(id)
Definition spawnfunc.qh:96
#define PAGE_TEXT
Definition string.qh:642
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:648
#define PAGE_TEXT_INIT()
Definition string.qh:641
bool turret_initialize(entity this, Turret tur)
const int TFL_DMG_HEADSHAKE
damage shakes head
Definition turret.qh:173
const int TFL_TARGETSELECT_TEAMCHECK
don't attack teammates
Definition turret.qh:88
const int TUR_FLAG_HITSCAN
hit scan
Definition turret.qh:140
const int TFL_AIM_LEAD
try to predict target movement
Definition turret.qh:100
const int TFL_TARGETSELECT_PLAYERS
target players
Definition turret.qh:83
const int TFL_TARGETSELECT_RANGELIMITS
limit target selection range
Definition turret.qh:87
const int TFL_AMMO_BULLETS
uses bullets
Definition turret.qh:159
const int TFL_AIM_SHOTTIMECOMPENSATE
compensate for shot traveltime when leading
Definition turret.qh:101
const int TFL_AMMO_RECHARGE
regenerates ammo
Definition turret.qh:161
const int TFL_AMMO_RECIEVE
can recieve ammo from support units
Definition turret.qh:162