Xonotic
random.qh
Go to the documentation of this file.
1 #pragma once
2 
9 
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)
18 
19 // prandom - PREDICTABLE random number generator
20 
21 #define USE_PRANDOM
22 
23 #ifdef USE_PRANDOM
24  float prandom();
26 
27  void psrandom(float seed);
28  #ifdef USE_PRANDOM_DEBUG
29  void prandom_debug();
30  #else
31  #define prandom_debug()
32  #endif
33 #else
34  #define prandom random
35  #define prandomvec randomvec
36  #define psrandom(x)
37  #define prandom_debug()
38 #endif
float RandomSelection_totalweight
Definition: random.qh:3
vector RandomSelection_chosen_vec
Definition: random.qh:8
string RandomSelection_chosen_string
Definition: random.qh:7
#define prandom_debug()
Definition: random.qh:31
entity() spawn
float RandomSelection_chosen_float
Definition: random.qh:6
#define ERASEABLE
Definition: _all.inc:35
vector prandomvec()
Definition: random.qc:113
float prandom()
Definition: random.qc:100
entity RandomSelection_chosen_ent
Definition: random.qh:5
vector(float skel, float bonenum) _skel_get_boneabs_hidden
vector v
Definition: ent_cs.qc:116
ERASEABLE void RandomSelection_Add(entity e, float f, string s, vector v, float weight, float priority)
Definition: random.qc:14
void psrandom(float seed)
Definition: random.qc:128
ERASEABLE void RandomSelection_Init()
Definition: random.qc:4
float RandomSelection_best_priority
Definition: random.qh:4