]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/util.qc
Properly split up notifications.qc into two files (one being .qh)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / util.qc
index 4d9ce517d1abcb0fccb0c57e14bba2e9d4314e6b..8e3f81f5a72fdec754d332b1c4a84f9c1424f5db 100644 (file)
@@ -2479,3 +2479,29 @@ void FindConnectedComponent(entity e, .entity fld, findNextEntityNearFunction_t
        for(queue_start = e; queue_start; queue_start = queue_start.fld)
                queue_start.FindConnectedComponent_processing = 0;
 }
+
+float Count_Proper_Strings(string improper, string...count)
+{
+       float i, total = 0;
+       string tmp;
+       
+       for(i = 0; i < count; ++i)
+       {
+               tmp = ...(i, string);
+               if((tmp) && (tmp != improper)) { ++total; }
+       }
+       
+       return total;
+}
+
+float Count_Proper_Floats(float improper, float...count)
+{
+       float i, total = 0;
+       
+       for(i = 0; i < count; ++i)
+       {
+               if(...(i, float) != improper) { ++total; }
+       }
+       
+       return total;
+}