|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
Header file that describes the functions related to game items. More...
Go to the source code of this file.
Macros | |
| #define | ITEM_IS_EXPIRING(item) |
| Returns whether the item is expiring (i.e. | |
| #define | ITEM_IS_LOOT(item) |
| Returns whether the item is loot. | |
| #define | ITEM_SET_EXPIRING(item, expiring) |
| Sets the item expiring status (i.e. | |
| #define | ITEM_SET_LOOT(item, loot) |
| Sets the item loot status. | |
| #define | ITEM_SHOULD_KEEP_POSITION(item) |
| Returns whether item should keep its position or be dropped to the ground. | |
Functions | |
| bool | Item_Initialise (entity item) |
| An optimised and generic way to initialise items (loot or permanent) | |
| bool | Item_IsDefinitionAllowed (entity definition) |
| Checks whether the items with the specified definition are allowed to spawn. | |
| entity | Item_RandomFromList (string itemlist) |
| Takes a space-separated list of netnames, returns the itemdef of one of them (or NULL if none are available). | |
Variables | |
| float | lifetime |
| lifetime < 0 means permanent (not loot), lifetime > 0 overrides the default | |
| bool | m_isexpiring |
| Holds whether strength, shield or superweapon timers expire while this item is on the ground. | |
| bool | m_isloot |
| Holds whether item is loot. | |
| bool | startitem_failed |
Header file that describes the functions related to game items.
Definition in file spawning.qh.
| #define ITEM_IS_EXPIRING | ( | item | ) |
Returns whether the item is expiring (i.e.
its strength, shield and superweapon timers expire while it is on the ground).
| [in] | item | Item to check. |
Definition at line 58 of file spawning.qh.
Referenced by Item_Touch(), and StartItem().
| #define ITEM_IS_LOOT | ( | item | ) |
Returns whether the item is loot.
| [in] | item | Item to check. |
Definition at line 39 of file spawning.qh.
Referenced by havocbot_goalrating_items(), havocbot_movetogoal(), isPushable(), Item_Reset(), Item_Think(), Item_Touch(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), setItemGroup(), StartItem(), target_items_use(), and weapon_defaultspawnfunc().
| #define ITEM_SET_EXPIRING | ( | item, | |
| expiring ) |
Sets the item expiring status (i.e.
whether its strength, shield and superweapon timers expire while it is on the ground).
| [in,out] | item | Item to adjust. |
| [in] | expiring | Whether item is expiring. |
Definition at line 65 of file spawning.qh.
Referenced by powerups_DropItem(), and W_ThrowNewWeapon().
| #define ITEM_SET_LOOT | ( | item, | |
| loot ) |
Sets the item loot status.
| [in,out] | item | Item to adjust. |
| [in] | loot | Whether item is loot. |
Definition at line 45 of file spawning.qh.
Referenced by Item_Initialise(), monster_dropitem(), and W_ThrowNewWeapon().
| #define ITEM_SHOULD_KEEP_POSITION | ( | item | ) |
Returns whether item should keep its position or be dropped to the ground.
| [in] | item | Item to check. |
Definition at line 52 of file spawning.qh.
Referenced by buff_SpawnReplacement(), and Item_CopyFields().
An optimised and generic way to initialise items (loot or permanent)
| [in] | item | The item entity to initialise |
Definition at line 27 of file spawning.qc.
References entity(), FOREACH, ITEM_SET_LOOT, LABEL, LOG_FATALF, StartItem(), time, weapon_defaultspawnfunc(), and Weapons.
Referenced by monster_dropitem(), MUTATOR_HOOKFUNCTION(), ok_DropItem(), powerups_DropItem(), RandomItems_ReplaceMapItem(), and RandomItems_SpawnLootItem().
Checks whether the items with the specified definition are allowed to spawn.
| [in] | definition | Item definition to check. |
Definition at line 17 of file spawning.qc.
References entity(), and MUTATOR_CALLHOOK.
Referenced by Item_RandomFromList(), RandomItems_GetRandomInstagibItemClassName(), RandomItems_GetRandomItemClassNameWithProperty(), RandomItems_GetRandomOverkillItemClassName(), and weapon_defaultspawnfunc().
Takes a space-separated list of netnames, returns the itemdef of one of them (or NULL if none are available).
Definition at line 71 of file spawning.qc.
References entity(), FOREACH, FOREACH_WORD, ITEM_FLAG_NORMAL, Item_IsDefinitionAllowed(), NULL, RandomSelection_AddEnt, RandomSelection_chosen_ent, RandomSelection_Init(), Weapons, and WEP_FLAG_MUTATORBLOCKED.
Referenced by monster_dropitem(), and ok_DropItem().
| float lifetime |
lifetime < 0 means permanent (not loot), lifetime > 0 overrides the default
Definition at line 10 of file spawning.qh.
| bool m_isexpiring |
Holds whether strength, shield or superweapon timers expire while this item is on the ground.
Definition at line 14 of file spawning.qh.
| bool m_isloot |
Holds whether item is loot.
Definition at line 12 of file spawning.qh.
| bool startitem_failed |
Definition at line 7 of file spawning.qh.
Referenced by StartItem(), W_ThrowNewWeapon(), and weapon_defaultspawnfunc().