|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
Header file that describes the random items mutator. More...
Go to the source code of this file.
Macros | |
| #define | EV_RandomItems_GetRandomItemClassName(i, o) |
| Called when random item classname is requested. | |
Enumerations | |
| enum | { RANDOM_ITEM_TYPE_HEALTH = BIT(0) , RANDOM_ITEM_TYPE_ARMOR = BIT(1) , RANDOM_ITEM_TYPE_RESOURCE = BIT(2) , RANDOM_ITEM_TYPE_WEAPON = BIT(3) , RANDOM_ITEM_TYPE_POWERUP = BIT(4) , RANDOM_ITEM_TYPE_ALL = BITS(5) } |
Functions | |
| MUTATOR_HOOKABLE (RandomItems_GetRandomItemClassName, EV_RandomItems_GetRandomItemClassName) | |
| string | RandomItems_GetRandomItemClassName (string prefix) |
| Returns a random classname of the item. | |
| string | RandomItems_GetRandomVanillaItemClassName (string prefix, int types) |
| Returns a random classname of the vanilla item. | |
| REGISTER_MUTATOR (random_items,(autocvar_g_random_items||autocvar_g_random_loot)) | |
Variables | |
| bool | autocvar_g_random_items |
| Whether to enable random items. | |
| bool | autocvar_g_random_loot |
| Whether to enable random loot. | |
Header file that describes the random items mutator.
Definition in file sv_random_items.qh.
| #define EV_RandomItems_GetRandomItemClassName | ( | i, | |
| o ) |
Called when random item classname is requested.
Definition at line 37 of file sv_random_items.qh.
Referenced by MUTATOR_HOOKABLE().
| anonymous enum |
| Enumerator | |
|---|---|
| RANDOM_ITEM_TYPE_HEALTH | |
| RANDOM_ITEM_TYPE_ARMOR | |
| RANDOM_ITEM_TYPE_RESOURCE | |
| RANDOM_ITEM_TYPE_WEAPON | |
| RANDOM_ITEM_TYPE_POWERUP | |
| RANDOM_ITEM_TYPE_ALL | |
Definition at line 11 of file sv_random_items.qh.
| MUTATOR_HOOKABLE | ( | RandomItems_GetRandomItemClassName | , |
| EV_RandomItems_GetRandomItemClassName | ) |
Returns a random classname of the item.
| [in] | prefix | Prefix of the cvars that hold probabilities. |
Definition at line 54 of file sv_random_items.qc.
References M_ARGV, MUTATOR_CALLHOOK, RANDOM_ITEM_TYPE_ALL, RandomItems_GetRandomItemClassName(), and RandomItems_GetRandomVanillaItemClassName().
Referenced by MUTATOR_HOOKABLE(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), RandomItems_GetRandomItemClassName(), RandomItems_ReplaceMapItem(), and RandomItems_SpawnLootItem().
Returns a random classname of the vanilla item.
| [in] | prefix | Prefix of the cvars that hold probabilities. |
| [in] | types | Bitmask of the types. See RANDOM_ITEM_TYPE constants. |
Definition at line 64 of file sv_random_items.qc.
References cvar(), CVAR_TYPEFLAG_EXISTS, FOREACH, instanceOfAmmo, instanceOfArmor, instanceOfHealth, instanceOfPowerup, LOG_WARNF, RANDOM_ITEM_TYPE_ARMOR, RANDOM_ITEM_TYPE_HEALTH, RANDOM_ITEM_TYPE_POWERUP, RANDOM_ITEM_TYPE_RESOURCE, RANDOM_ITEM_TYPE_WEAPON, RandomItems_GetRandomItemClassNameWithProperty(), RandomSelection_AddFloat, RandomSelection_AddString, RandomSelection_chosen_float, RandomSelection_chosen_string, RandomSelection_Init(), Weapons, and WEP_FLAG_MUTATORBLOCKED.
Referenced by RandomItems_GetRandomItemClassName().
| REGISTER_MUTATOR | ( | random_items | , |
| (autocvar_g_random_items||autocvar_g_random_loot) | ) |
References autocvar_g_random_items, and autocvar_g_random_loot.
| bool autocvar_g_random_items |
Whether to enable random items.
Definition at line 8 of file sv_random_items.qh.
Referenced by MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), and REGISTER_MUTATOR().
| bool autocvar_g_random_loot |
Whether to enable random loot.
Definition at line 9 of file sv_random_items.qh.
Referenced by MUTATOR_HOOKFUNCTION(), and REGISTER_MUTATOR().