]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/lib/random.qc
Add some missing parenthesis
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / random.qc
index 2287d869d0c455bdbf15c77950ac8a5671f20b64..a5ff69356a21f516ba290bac01761eac2a7cce88 100644 (file)
@@ -1,5 +1,6 @@
 #include "random.qh"
 
+ERASEABLE
 void RandomSelection_Init()
 {
        RandomSelection_totalweight = 0;
@@ -9,7 +10,8 @@ void RandomSelection_Init()
        RandomSelection_best_priority = -1;
 }
 
-void RandomSelection_Add(entity e, float f, string s, float weight, float priority)
+ERASEABLE
+void RandomSelection_Add(entity e, float f, string s, vector v, float weight, float priority)
 {
        if (priority > RandomSelection_best_priority)
        {
@@ -17,6 +19,7 @@ void RandomSelection_Add(entity e, float f, string s, float weight, float priori
                RandomSelection_chosen_ent = e;
                RandomSelection_chosen_float = f;
                RandomSelection_chosen_string = s;
+               RandomSelection_chosen_vec = v;
                RandomSelection_totalweight = weight;
        }
        else if (priority == RandomSelection_best_priority)
@@ -27,6 +30,7 @@ void RandomSelection_Add(entity e, float f, string s, float weight, float priori
                        RandomSelection_chosen_ent = e;
                        RandomSelection_chosen_float = f;
                        RandomSelection_chosen_string = s;
+                       RandomSelection_chosen_vec = v;
                }
        }
 }
@@ -34,6 +38,7 @@ void RandomSelection_Add(entity e, float f, string s, float weight, float priori
 float DistributeEvenly_amount;
 float DistributeEvenly_totalweight;
 
+ERASEABLE
 void DistributeEvenly_Init(float amount, float totalweight)
 {
        if (DistributeEvenly_amount)
@@ -45,6 +50,7 @@ void DistributeEvenly_Init(float amount, float totalweight)
        DistributeEvenly_totalweight = totalweight;
 }
 
+ERASEABLE
 float DistributeEvenly_Get(float weight)
 {
        float f;
@@ -55,6 +61,7 @@ float DistributeEvenly_Get(float weight)
        return f;
 }
 
+ERASEABLE
 float DistributeEvenly_GetRandomized(float weight)
 {
        float f;
@@ -68,6 +75,7 @@ float DistributeEvenly_GetRandomized(float weight)
 // from the GNU Scientific Library
 float gsl_ran_gaussian_lastvalue;
 float gsl_ran_gaussian_lastvalue_set;
+ERASEABLE
 float gsl_ran_gaussian(float sigma)
 {
        if (gsl_ran_gaussian_lastvalue_set)