Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
item.qh File Reference
Include dependency graph for item.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GameItem

Macros

#define ITEM_HANDLE(signal, ...)
#define SPAWNFUNC_BODY(item)
#define SPAWNFUNC_ITEM(name, item)

Enumerations

enum  { ITEM_FLAG_NORMAL = BIT(0) , ITEM_FLAG_MUTATORBLOCKED = BIT(1) , ITEM_FLAG_RESOURCE = BIT(2) }

Variables

float buffs_finished
float fade_end
float fade_start
float invincible_finished
const int ISF_ANGLES = BIT(6)
const int ISF_COLORMAP = BIT(4)
const int ISF_DROP = BIT(5)
const int ISF_LOCATION = BIT(1)
const int ISF_REMOVEFX = BIT(0)
const int ISF_SIZE = BIT(7)
const int ISF_SIZE2 = BIT(2)
const int ISF_STATUS = BIT(3)
const int IT_BUFF = BIT(8)
const float IT_DESPAWNFX_TIME = 1.5
const int IT_FUEL_REGEN = BIT(4)
const int IT_INVINCIBLE = BIT(10)
const int IT_INVISIBILITY = BIT(9)
const int IT_JETPACK = BIT(2)
const int IT_KEY1 = BIT(6)
const int IT_KEY2 = BIT(7)
const int IT_PICKUPMASK = IT_UNLIMITED_AMMO | IT_UNLIMITED_SUPERWEAPONS | IT_JETPACK | IT_FUEL_REGEN
const int IT_RESOURCE = BIT(5)
const int IT_SPEED = BIT(13)
const int IT_STRENGTH = BIT(12)
const int IT_SUPERWEAPON = BIT(11)
const int IT_UNLIMITED_AMMO = BIT(0)
const int IT_UNLIMITED_SUPERWEAPONS = BIT(1)
const float IT_UPDATE_INTERVAL = 0.0625
const int IT_USING_JETPACK = BIT(3)
const vector ITEM_D_MAXS = '30 30 48'
const vector ITEM_D_MINS = '-30 -30 0'
const vector ITEM_L_MAXS = '30 30 70'
const vector ITEM_S_MAXS = '24 24 48'
const vector ITEM_S_MINS = '-24 -24 0'
int ItemStatus
const int ITS_ALLOWFB = BIT(4)
const int ITS_ALLOWSI = BIT(5)
const int ITS_ANIMATE1 = BIT(1)
const int ITS_ANIMATE2 = BIT(2)
const int ITS_AVAILABLE = BIT(3)
const int ITS_EXPIRING = BIT(7)
const int ITS_GLOW = BIT(6)
const int ITS_STAYWEP = BIT(0)
string mdl
float strength_finished

Macro Definition Documentation

◆ ITEM_HANDLE

#define ITEM_HANDLE ( signal,
... )
Value:
__Item_Send_##signal(__VA_ARGS__)

Definition at line 125 of file item.qh.

Referenced by ctf_FlagTouch(), Dump_Items(), and Item_Touch().

◆ SPAWNFUNC_BODY

#define SPAWNFUNC_BODY ( item)
Value:
if (item && Item_IsDefinitionAllowed(item)) \
StartItem(this, item); \
else \
{ \
startitem_failed = true; \
delete(this); \
}
bool Item_IsDefinitionAllowed(entity definition)
Checks whether the items with the specified definition are allowed to spawn.
Definition spawning.qc:17
bool startitem_failed
Definition spawning.qh:7

Definition at line 97 of file item.qh.

97#define SPAWNFUNC_BODY(item) \
98 if (item && Item_IsDefinitionAllowed(item)) \
99 StartItem(this, item); \
100 else \
101 { \
102 startitem_failed = true; \
103 delete(this); \
104 }

◆ SPAWNFUNC_ITEM

#define SPAWNFUNC_ITEM ( name,
item )
Value:
{ \
SPAWNFUNC_BODY((item)) \
}
string name
Definition menu.qh:30
#define spawnfunc(id)
Definition spawnfunc.qh:96

Definition at line 106 of file item.qh.

106#define SPAWNFUNC_ITEM(name, item) \
107 spawnfunc(name) \
108 { \
109 SPAWNFUNC_BODY((item)) \
110 }

Referenced by REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), REGISTER_ITEM(), and REGISTER_ITEM().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ITEM_FLAG_NORMAL 

Item is usable during normal gameplay.

ITEM_FLAG_MUTATORBLOCKED 
ITEM_FLAG_RESOURCE 

Item is is a resource, not a held item.

Definition at line 118 of file item.qh.

119{
120 ITEM_FLAG_NORMAL = BIT(0),
123};
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
Definition bits.qh:8
@ ITEM_FLAG_MUTATORBLOCKED
Definition item.qh:121
@ ITEM_FLAG_RESOURCE
Item is is a resource, not a held item.
Definition item.qh:122
@ ITEM_FLAG_NORMAL
Item is usable during normal gameplay.
Definition item.qh:120

Variable Documentation

◆ buffs_finished

float buffs_finished

Definition at line 95 of file item.qh.

Referenced by buff_Init(), buff_Touch(), and spawnfunc().

◆ fade_end

◆ fade_start

float fade_start

Definition at line 86 of file item.qh.

Referenced by g_clientmodel_genericsendentity(), HUD_Notify(), and ItemDraw().

◆ invincible_finished

float invincible_finished

Definition at line 94 of file item.qh.

Referenced by Item_Touch(), spawnfunc(), and StartItem().

◆ ISF_ANGLES

const int ISF_ANGLES = BIT(6)

Definition at line 55 of file item.qh.

Referenced by ItemSend(), NET_HANDLE(), and StartItem().

◆ ISF_COLORMAP

const int ISF_COLORMAP = BIT(4)

Definition at line 53 of file item.qh.

Referenced by ItemSend(), NET_HANDLE(), and StartItem().

◆ ISF_DROP

const int ISF_DROP = BIT(5)

Definition at line 54 of file item.qh.

Referenced by ItemSend(), and NET_HANDLE().

◆ ISF_LOCATION

const int ISF_LOCATION = BIT(1)

Definition at line 50 of file item.qh.

Referenced by ItemSend(), ItemUpdate(), and NET_HANDLE().

◆ ISF_REMOVEFX

const int ISF_REMOVEFX = BIT(0)

Definition at line 49 of file item.qh.

Referenced by Item_Touch(), NET_HANDLE(), and RemoveItem().

◆ ISF_SIZE

const int ISF_SIZE = BIT(7)

Definition at line 56 of file item.qh.

Referenced by ItemSend(), and NET_HANDLE().

◆ ISF_SIZE2

const int ISF_SIZE2 = BIT(2)

Definition at line 51 of file item.qh.

Referenced by ItemSend(), and NET_HANDLE().

◆ ISF_STATUS

const int ISF_STATUS = BIT(3)

Definition at line 52 of file item.qh.

Referenced by Item_Show(), Item_Think(), ItemSend(), and NET_HANDLE().

◆ IT_BUFF

const int IT_BUFF = BIT(8)

Definition at line 35 of file item.qh.

◆ IT_DESPAWNFX_TIME

const float IT_DESPAWNFX_TIME = 1.5

Definition at line 72 of file item.qh.

Referenced by Item_Think(), and ItemDraw().

◆ IT_FUEL_REGEN

const int IT_FUEL_REGEN = BIT(4)

Definition at line 28 of file item.qh.

Referenced by Item_GiveTo().

◆ IT_INVINCIBLE

const int IT_INVINCIBLE = BIT(10)

Definition at line 40 of file item.qh.

◆ IT_INVISIBILITY

const int IT_INVISIBILITY = BIT(9)

Definition at line 39 of file item.qh.

◆ IT_JETPACK

const int IT_JETPACK = BIT(2)

Definition at line 26 of file item.qh.

Referenced by havocbot_movetogoal(), Item_GiveTo(), and navigation_routetogoal().

◆ IT_KEY1

const int IT_KEY1 = BIT(6)

Definition at line 32 of file item.qh.

◆ IT_KEY2

const int IT_KEY2 = BIT(7)

Definition at line 33 of file item.qh.

◆ IT_PICKUPMASK

Definition at line 46 of file item.qh.

Referenced by Item_GiveTo().

◆ IT_RESOURCE

const int IT_RESOURCE = BIT(5)

Definition at line 30 of file item.qh.

Referenced by Item_Touch().

◆ IT_SPEED

const int IT_SPEED = BIT(13)

Definition at line 43 of file item.qh.

◆ IT_STRENGTH

const int IT_STRENGTH = BIT(12)

Definition at line 42 of file item.qh.

◆ IT_SUPERWEAPON

const int IT_SUPERWEAPON = BIT(11)

Definition at line 41 of file item.qh.

Referenced by player_powerups(), player_powerups_remove_all(), and spawnfunc().

◆ IT_UNLIMITED_AMMO

◆ IT_UNLIMITED_SUPERWEAPONS

◆ IT_UPDATE_INTERVAL

const float IT_UPDATE_INTERVAL = 0.0625

Definition at line 76 of file item.qh.

Referenced by Item_Think(), and StartItem().

◆ IT_USING_JETPACK

const int IT_USING_JETPACK = BIT(3)

◆ ITEM_D_MAXS

const vector ITEM_D_MAXS = '30 30 48'

Definition at line 83 of file item.qh.

Referenced by NET_HANDLE(), and W_Porto_Fail().

◆ ITEM_D_MINS

const vector ITEM_D_MINS = '-30 -30 0'

Definition at line 82 of file item.qh.

Referenced by buff_Init(), buff_Think(), NET_HANDLE(), and W_Porto_Fail().

◆ ITEM_L_MAXS

const vector ITEM_L_MAXS = '30 30 70'

Definition at line 84 of file item.qh.

Referenced by buff_Init(), buff_Think(), ItemSend(), and NET_HANDLE().

◆ ITEM_S_MAXS

const vector ITEM_S_MAXS = '24 24 48'

Definition at line 81 of file item.qh.

Referenced by ItemSend(), and NET_HANDLE().

◆ ITEM_S_MINS

const vector ITEM_S_MINS = '-24 -24 0'

Definition at line 80 of file item.qh.

Referenced by NET_HANDLE().

◆ ItemStatus

int ItemStatus

Definition at line 61 of file item.qh.

Referenced by Item_Think(), ItemDraw(), ItemSend(), NET_HANDLE(), and StartItem().

◆ ITS_ALLOWFB

const int ITS_ALLOWFB = BIT(4)

Definition at line 66 of file item.qh.

Referenced by Item_Show(), and NET_HANDLE().

◆ ITS_ALLOWSI

const int ITS_ALLOWSI = BIT(5)

Definition at line 67 of file item.qh.

Referenced by Item_Show(), and ItemDraw().

◆ ITS_ANIMATE1

const int ITS_ANIMATE1 = BIT(1)

Definition at line 63 of file item.qh.

Referenced by ItemDraw(), and StartItem().

◆ ITS_ANIMATE2

const int ITS_ANIMATE2 = BIT(2)

Definition at line 64 of file item.qh.

Referenced by ItemDraw(), and StartItem().

◆ ITS_AVAILABLE

const int ITS_AVAILABLE = BIT(3)

Definition at line 65 of file item.qh.

Referenced by Item_Show(), ItemDraw(), NET_HANDLE(), and Weapon_whereis().

◆ ITS_EXPIRING

const int ITS_EXPIRING = BIT(7)

Definition at line 69 of file item.qh.

Referenced by Item_Think(), and ItemDraw().

◆ ITS_GLOW

const int ITS_GLOW = BIT(6)

Definition at line 68 of file item.qh.

Referenced by Item_Show(), and NET_HANDLE().

◆ ITS_STAYWEP

const int ITS_STAYWEP = BIT(0)

Definition at line 62 of file item.qh.

Referenced by Item_Show(), and ItemDraw().

◆ mdl

◆ strength_finished

float strength_finished

Definition at line 93 of file item.qh.

Referenced by Item_Touch(), spawnfunc(), and StartItem().