Xonotic
|
Go to the source code of this file.
Macros | |
#define | prandom_debug() |
#define | RandomSelection_AddEnt(e, weight, priority) RandomSelection_Add(e, 0, string_null, '0 0 0', weight, priority) |
#define | RandomSelection_AddFloat(f, weight, priority) RandomSelection_Add(NULL, f, string_null, '0 0 0', weight, priority) |
#define | RandomSelection_AddString(s, weight, priority) RandomSelection_Add(NULL, 0, s, '0 0 0', weight, priority) |
#define | RandomSelection_AddVec(v, weight, priority) RandomSelection_Add(NULL, 0, string_null, v, weight, priority) |
#define | USE_PRANDOM |
Functions | |
float | prandom () |
vector | prandomvec () |
void | psrandom (float seed) |
ERASEABLE void | RandomSelection_Add (entity e, float f, string s, vector v, float weight, float priority) |
ERASEABLE void | RandomSelection_Init () |
#define prandom_debug | ( | ) |
Definition at line 31 of file random.qh.
Referenced by NET_HANDLE(), and psrandom().
#define RandomSelection_AddEnt | ( | e, | |
weight, | |||
priority | |||
) | RandomSelection_Add(e, 0, string_null, '0 0 0', weight, priority) |
Definition at line 14 of file random.qh.
Referenced by buff_NewType(), CheatCommand(), CheatImpulse(), invasion_PickMonster(), invasion_PickSpawn(), jumppad_push(), MUTATOR_HOOKFUNCTION(), Simple_TeleportPlayer(), Spawn_WeightedPoint(), SUB_UseTargets_Ex(), train_next_find(), and W_RandomWeapons().
#define RandomSelection_AddFloat | ( | f, | |
weight, | |||
priority | |||
) | RandomSelection_Add(NULL, f, string_null, '0 0 0', weight, priority) |
Definition at line 15 of file random.qh.
Referenced by invasion_SpawnChosenMonster(), MapVote_CheckRules_2(), NIX_ChooseNextWeapon(), RandomItems_GetRandomVanillaItemClassName(), and TeamBalance_FindBestTeam().
#define RandomSelection_AddString | ( | s, | |
weight, | |||
priority | |||
) | RandomSelection_Add(NULL, 0, s, '0 0 0', weight, priority) |
Definition at line 16 of file random.qh.
Referenced by bot_setnameandstuff(), FixIntermissionClient(), RandomItems_GetRandomInstagibItemClassName(), RandomItems_GetRandomItemClassNameWithProperty(), RandomItems_GetRandomOverkillItemClassName(), and RandomItems_GetRandomVanillaItemClassName().
#define RandomSelection_AddVec | ( | v, | |
weight, | |||
priority | |||
) | RandomSelection_Add(NULL, 0, string_null, v, weight, priority) |
float prandom | ( | ) |
Definition at line 100 of file random.qc.
References ftos(), LOG_TRACE, M_PI, prandom_seed, and strcat().
Referenced by prandomvec(), SND_GIB_SPLAT_RANDOM(), and turret_gibtoss().
vector prandomvec | ( | ) |
Definition at line 128 of file random.qc.
References ftos(), LOG_TRACE, prandom_debug, and prandom_seed.
Referenced by NET_HANDLE().
ERASEABLE void RandomSelection_Add | ( | entity | e, |
float | f, | ||
string | s, | ||
vector | v, | ||
float | weight, | ||
float | priority | ||
) |
Definition at line 14 of file random.qc.
References random(), RandomSelection_best_priority, RandomSelection_chosen_ent, RandomSelection_chosen_float, RandomSelection_chosen_string, RandomSelection_chosen_vec, RandomSelection_totalweight, and v.
Referenced by MUTATOR_HOOKFUNCTION().
Definition at line 4 of file random.qc.
References ERASEABLE, NULL, RandomSelection_best_priority, RandomSelection_chosen_ent, RandomSelection_chosen_float, RandomSelection_chosen_string, RandomSelection_totalweight, and string_null.
Referenced by bot_setnameandstuff(), buff_NewType(), CheatCommand(), CheatImpulse(), FixIntermissionClient(), GiveRandomWeapons(), invasion_PickMonster(), invasion_PickSpawn(), invasion_SpawnChosenMonster(), Item_FindTeam(), Item_Touch(), jumppad_push(), MapInfo_LoadMapSettings(), MapVote_CheckRules_2(), MUTATOR_HOOKFUNCTION(), NIX_ChooseNextWeapon(), RandomItems_GetRandomInstagibItemClassName(), RandomItems_GetRandomItemClassNameWithProperty(), RandomItems_GetRandomOverkillItemClassName(), RandomItems_GetRandomVanillaItemClassName(), Simple_TeleportPlayer(), Spawn_WeightedPoint(), spawnmonster(), SUB_UseTargets_Ex(), TeamBalance_FindBestTeam(), TeleportPlayer(), train_next_find(), and W_RandomWeapons().
float RandomSelection_best_priority |
Definition at line 4 of file random.qh.
Referenced by MapVote_CheckRules_2(), RandomSelection_Add(), and RandomSelection_Init().
entity RandomSelection_chosen_ent |
Definition at line 5 of file random.qh.
Referenced by buff_NewType(), CheatCommand(), CheatImpulse(), GiveRandomWeapons(), invasion_PickMonster(), invasion_PickSpawn(), Item_FindTeam(), Item_Touch(), jumppad_push(), MapInfo_LoadMapSettings(), MUTATOR_HOOKFUNCTION(), RandomSelection_Add(), RandomSelection_Init(), Simple_TeleportPlayer(), Spawn_WeightedPoint(), spawnmonster(), SUB_UseTargets_Ex(), train_next_find(), and W_RandomWeapons().
float RandomSelection_chosen_float |
Definition at line 6 of file random.qh.
Referenced by invasion_SpawnChosenMonster(), MapVote_CheckRules_2(), NIX_ChooseNextWeapon(), RandomItems_GetRandomVanillaItemClassName(), RandomSelection_Add(), RandomSelection_Init(), and TeamBalance_FindBestTeam().
string RandomSelection_chosen_string |
Definition at line 7 of file random.qh.
Referenced by bot_setnameandstuff(), FixIntermissionClient(), invasion_SpawnChosenMonster(), RandomItems_GetRandomInstagibItemClassName(), RandomItems_GetRandomItemClassNameWithProperty(), RandomItems_GetRandomOverkillItemClassName(), RandomItems_GetRandomVanillaItemClassName(), RandomSelection_Add(), RandomSelection_Init(), and TeleportPlayer().
vector RandomSelection_chosen_vec |
Definition at line 8 of file random.qh.
Referenced by MUTATOR_HOOKFUNCTION(), and RandomSelection_Add().
float RandomSelection_totalweight |
Definition at line 3 of file random.qh.
Referenced by RandomSelection_Add(), and RandomSelection_Init().