|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
Go to the source code of this file.
Macros | |
| #define | crandom() |
| Returns a random number between -1.0 and 1.0. | |
| #define | prandom_debug() |
| #define | RandomSelection_AddEnt(e, weight, priority) |
| #define | RandomSelection_AddFloat(f, weight, priority) |
| #define | RandomSelection_AddString(s, weight, priority) |
| #define | RandomSelection_AddVec(v, weight, priority) |
| #define | USE_PRANDOM |
Functions | |
| ERASEABLE float | DistributeEvenly_Get (float weight) |
| ERASEABLE float | DistributeEvenly_GetRandomized (float weight) |
| ERASEABLE float | DistributeEvenly_GetRounded (float weight) |
| ERASEABLE void | DistributeEvenly_Init (float amount, float totalweight) |
| ERASEABLE float | gsl_ran_ugaussian () |
| Returns a Gaussian random variate, with mean zero and standard deviation sigma 1 From the GNU Scientific Library. | |
| float | prandom () |
| Predictable random number generator (not seeded yet) | |
| 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 crandom | ( | ) |
Returns a random number between -1.0 and 1.0.
Definition at line 32 of file random.qh.
Referenced by ctf_Handle_Throw(), func_breakable_destroy(), havocbot_movetogoal(), Item_ScheduleRespawn(), ka_DropEvent(), LaunchDebris(), and tka_DropEvent().
| #define prandom_debug | ( | ) |
Definition at line 44 of file random.qh.
Referenced by NET_HANDLE().
| #define RandomSelection_AddEnt | ( | e, | |
| weight, | |||
| priority ) |
Definition at line 14 of file random.qh.
Referenced by buff_NewType(), CheatCommand(), CheatImpulse(), GiveRandomWeapons(), invasion_PickMonster(), invasion_PickSpawn(), Item_RandomFromList(), jumppad_push(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), nade_choose_random(), napalm_damage(), SelectObservePoint(), Simple_TeleportPlayer(), Spawn_WeightedPoint(), SUB_UseTargets_Ex(), train_next_find(), W_Fireball_LaserPlay(), and W_RandomWeapons().
| #define RandomSelection_AddFloat | ( | f, | |
| weight, | |||
| priority ) |
Definition at line 15 of file random.qh.
Referenced by NIX_ChooseNextWeapon(), RandomItems_GetRandomVanillaItemClassName(), and TeamBalance_FindBestTeam().
| #define RandomSelection_AddString | ( | s, | |
| 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 ) |
Definition at line 52 of file random.qc.
References DistributeEvenly_amount, and DistributeEvenly_totalweight.
Referenced by kh_LoserTeam(), and kh_WinnerTeam().
Definition at line 74 of file random.qc.
References DistributeEvenly_amount, DistributeEvenly_totalweight, floor(), and random().
Definition at line 63 of file random.qc.
References DistributeEvenly_amount, DistributeEvenly_totalweight, and floor().
Definition at line 42 of file random.qc.
References DistributeEvenly_amount, DistributeEvenly_totalweight, ftos(), and LOG_TRACE.
Referenced by kh_LoserTeam(), and kh_WinnerTeam().
Returns a Gaussian random variate, with mean zero and standard deviation sigma 1 From the GNU Scientific Library.
Definition at line 87 of file random.qc.
References cos(), log(), M_PI, random(), sin(), and sqrt().
Referenced by W_CalculateSpread().
| float prandom | ( | ) |
Predictable random number generator (not seeded yet)
Definition at line 108 of file random.qc.
References ftos(), LOG_TRACE, M_PI, prandom_seed, and strcat().
Referenced by NET_HANDLE(), NET_HANDLE(), prandomvec(), SND_BRASS_RANDOM(), SND_CASINGS_RANDOM(), SND_GIB_SPLAT_RANDOM(), TossGib(), and turret_gibtoss().
| vector prandomvec | ( | ) |
Definition at line 121 of file random.qc.
References prandom(), and vector.
Referenced by NET_HANDLE(), NET_HANDLE(), RaptorCBShellfragToss(), TossGib(), and turret_gibtoss().
Definition at line 136 of file random.qc.
References ftos(), LOG_TRACE, 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 entity(), random(), RandomSelection_best_priority, RandomSelection_chosen_ent, RandomSelection_chosen_float, RandomSelection_chosen_string, RandomSelection_chosen_vec, RandomSelection_totalweight, and vector.
Referenced by MUTATOR_HOOKFUNCTION().
Definition at line 4 of file random.qc.
References 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_RandomFromList(), Item_Touch(), jumppad_push(), MapInfo_LoadMapSettings(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), nade_choose_random(), napalm_damage(), NIX_ChooseNextWeapon(), RandomItems_GetRandomInstagibItemClassName(), RandomItems_GetRandomItemClassNameWithProperty(), RandomItems_GetRandomOverkillItemClassName(), RandomItems_GetRandomVanillaItemClassName(), SelectObservePoint(), Simple_TeleportPlayer(), Spawn_WeightedPoint(), spawnmonster(), SUB_UseTargets_Ex(), TeamBalance_FindBestTeam(), TeleportPlayer(), train_next_find(), W_Fireball_LaserPlay(), and W_RandomWeapons().
| float RandomSelection_best_priority |
Definition at line 4 of file random.qh.
Referenced by 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_RandomFromList(), Item_Touch(), jumppad_push(), MapInfo_LoadMapSettings(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), MUTATOR_HOOKFUNCTION(), nade_choose_random(), napalm_damage(), RandomSelection_Add(), RandomSelection_Init(), SelectObservePoint(), Simple_TeleportPlayer(), Spawn_WeightedPoint(), spawnmonster(), SUB_UseTargets_Ex(), train_next_find(), W_Fireball_LaserPlay(), and W_RandomWeapons().
| float RandomSelection_chosen_float |
Definition at line 6 of file random.qh.
Referenced by 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().