|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "random.qh"Go to the source code of this file.
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 () |
Variables | |
| float | DistributeEvenly_amount |
| float | DistributeEvenly_totalweight |
| float | prandom_seed |
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 DistributeEvenly_amount |
Definition at line 38 of file random.qc.
Referenced by DistributeEvenly_Get(), DistributeEvenly_GetRandomized(), DistributeEvenly_GetRounded(), and DistributeEvenly_Init().
| float DistributeEvenly_totalweight |
Definition at line 39 of file random.qc.
Referenced by DistributeEvenly_Get(), DistributeEvenly_GetRandomized(), DistributeEvenly_GetRounded(), and DistributeEvenly_Init().
| float prandom_seed |
Definition at line 106 of file random.qc.
Referenced by prandom(), and psrandom().