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 vector RandomSelection_chosen_vec;
10 void RandomSelection_Init();
11 void RandomSelection_Add(entity e, float f, string s, vector v, float weight, float priority);
12 #define RandomSelection_AddEnt(e, weight, priority) RandomSelection_Add(e, 0, string_null, '0 0 0', weight, priority)
13 #define RandomSelection_AddFloat(f, weight, priority) RandomSelection_Add(NULL, f, string_null, '0 0 0', weight, priority)
14 #define RandomSelection_AddString(s, weight, priority) RandomSelection_Add(NULL, 0, s, '0 0 0', weight, priority)
15 #define RandomSelection_AddVec(v, weight, priority) RandomSelection_Add(NULL, 0, string_null, v, weight, priority)
17 // prandom - PREDICTABLE random number generator
25 void psrandom(float seed);
26 #ifdef USE_PRANDOM_DEBUG
29 #define prandom_debug()
32 #define prandom random
33 #define prandomvec randomvec
35 #define prandom_debug()