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;
11 void RandomSelection_Init();
13 void RandomSelection_Add(entity e, float f, string s, vector v, float weight, float priority);
14 #define RandomSelection_AddEnt(e, weight, priority) RandomSelection_Add(e, 0, string_null, '0 0 0', weight, priority)
15 #define RandomSelection_AddFloat(f, weight, priority) RandomSelection_Add(NULL, f, string_null, '0 0 0', weight, priority)
16 #define RandomSelection_AddString(s, weight, priority) RandomSelection_Add(NULL, 0, s, '0 0 0', weight, priority)
17 #define RandomSelection_AddVec(v, weight, priority) RandomSelection_Add(NULL, 0, string_null, v, weight, priority)
19 // prandom - PREDICTABLE random number generator
27 void psrandom(float seed);
28 #ifdef USE_PRANDOM_DEBUG
31 #define prandom_debug()
34 #define prandom random
35 #define prandomvec randomvec
37 #define prandom_debug()