]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use strcmp for config alphabetical sorting instead of my own solution
authorSamual Lenks <samual@xonotic.org>
Sun, 8 Dec 2013 02:23:41 +0000 (21:23 -0500)
committerSamual Lenks <samual@xonotic.org>
Sun, 8 Dec 2013 02:23:41 +0000 (21:23 -0500)
qcsrc/common/weapons/config.qc

index 5fec9caeace0bd53bf25b0614f4e7299ea72ee46..e3dfe6f5a8e8dbdc8048ac7c85c329a0af42a50b 100644 (file)
@@ -11,8 +11,10 @@ void W_Config_Queue_Swap(float root, float child, entity pass)
 
 float W_Config_Queue_Compare(float root, float child, entity pass)
 {
+       return strcmp(wep_config_queue[root], wep_config_queue[child]);
+       
+       #if 0
        float i, r, c;
-
        for(i = 1; i <= 100; ++i)
        {
                r = str2chr(wep_config_queue[root], i);
@@ -21,8 +23,9 @@ float W_Config_Queue_Compare(float root, float child, entity pass)
                else if(c > r) { return -1; }
                else { return 1; }
        }
-       
+
        return 0;
+       #endif
 }
 
 void Dump_Weapon_Settings(void)