From dec73b8158a2d429821a7ab6eaf63604caafc1d0 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sat, 7 Dec 2013 21:23:41 -0500 Subject: [PATCH] Use strcmp for config alphabetical sorting instead of my own solution --- qcsrc/common/weapons/config.qc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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) -- 2.39.2