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