]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/lib/random.qh
Merge branch 'master' into terencehill/tooltips_cleanup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / random.qh
1 #ifndef RANDOM_H
2 #define RANDOM_H
3
4 float RandomSelection_totalweight;
5 float RandomSelection_best_priority;
6 entity RandomSelection_chosen_ent;
7 float RandomSelection_chosen_float;
8 string RandomSelection_chosen_string;
9
10 void RandomSelection_Init();
11 void RandomSelection_Add(entity e, float f, string s, float weight, float priority);
12
13 // prandom - PREDICTABLE random number generator
14
15 #define USE_PRANDOM
16
17 #ifdef USE_PRANDOM
18 float prandom();
19 vector prandomvec();
20
21 void psrandom(float seed);
22 #ifdef USE_PRANDOM_DEBUG
23 void prandom_debug();
24 #else
25 #define prandom_debug()
26 #endif
27 #else
28 #define prandom random
29 #define prandomvec randomvec
30 #define psrandom(x)
31 #define prandom_debug()
32 #endif
33 #endif