X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Frandom.qh;h=b2fc53f0cac4edaaa3ef964c25b7b6093ac2ae2c;hb=ac9fba402abf745436adf0ecaa8f90347708ff53;hp=1834a97a331164086464ce6ecc87d0527971fb9a;hpb=692cb758fe8f25fa078bfd5885333ee031885600;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/random.qh b/qcsrc/lib/random.qh index 1834a97a3..b2fc53f0c 100644 --- a/qcsrc/lib/random.qh +++ b/qcsrc/lib/random.qh @@ -5,9 +5,14 @@ float RandomSelection_best_priority; entity RandomSelection_chosen_ent; float RandomSelection_chosen_float; string RandomSelection_chosen_string; +vector RandomSelection_chosen_vec; void RandomSelection_Init(); -void RandomSelection_Add(entity e, float f, string s, float weight, float priority); +void RandomSelection_Add(entity e, float f, string s, vector v, float weight, float priority); +#define RandomSelection_AddEnt(e, weight, priority) RandomSelection_Add(e, 0, string_null, '0 0 0', weight, priority) +#define RandomSelection_AddFloat(f, weight, priority) RandomSelection_Add(NULL, f, string_null, '0 0 0', weight, priority) +#define RandomSelection_AddString(s, weight, priority) RandomSelection_Add(NULL, 0, s, '0 0 0', weight, priority) +#define RandomSelection_AddVec(v, weight, priority) RandomSelection_Add(NULL, 0, string_null, v, weight, priority) // prandom - PREDICTABLE random number generator