From: Samual Lenks Date: Sun, 8 Dec 2013 02:23:41 +0000 (-0500) Subject: Use strcmp for config alphabetical sorting instead of my own solution X-Git-Tag: xonotic-v0.8.0~152^2~308 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dec73b8158a2d429821a7ab6eaf63604caafc1d0;p=xonotic%2Fxonotic-data.pk3dir.git Use strcmp for config alphabetical sorting instead of my own solution --- diff --git a/qcsrc/common/weapons/config.qc b/qcsrc/common/weapons/config.qc index 5fec9caea..e3dfe6f5a 100644 --- a/qcsrc/common/weapons/config.qc +++ b/qcsrc/common/weapons/config.qc @@ -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)