]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/turrets/config.qc
Merge branch 'master' into Mario/wepent_experimental
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / turrets / config.qc
index c2a609b15ca42f1764b0115f4bd9baf4ee0257b8..2b1e00c8a7d29d9db05b175bd357b4547786c480 100644 (file)
@@ -1,3 +1,4 @@
+#include "config.qh"
 // ==========================
 //  Turret Config Generator
 // ==========================
@@ -25,10 +26,10 @@ float T_Config_Queue_Compare(float root, float child, entity pass)
        return 0;
 }
 
-void Dump_Turret_Settings(void)
+void Dump_Turret_Settings()
 {
        float x, totalsettings = 0;
-       FOREACH(Turrets, it != TUR_Null, LAMBDA({
+       FOREACH(Turrets, it != TUR_Null, {
                // step 1: clear the queue
                TUR_CONFIG_COUNT = 0;
                for(x = 0; x <= MAX_TUR_CONFIG; ++x)
@@ -38,7 +39,7 @@ void Dump_Turret_Settings(void)
                it.tr_config(it);
 
                // step 3: sort queue
-               heapsort(TUR_CONFIG_COUNT, T_Config_Queue_Swap, T_Config_Queue_Compare, world);
+               heapsort(TUR_CONFIG_COUNT, T_Config_Queue_Swap, T_Config_Queue_Compare, NULL);
 
                // step 4: write queue
                TUR_CONFIG_WRITETOFILE(sprintf("// {{{ #%d: %s\n", i, it.turret_name))
@@ -49,7 +50,7 @@ void Dump_Turret_Settings(void)
                // step 5: debug info
                LOG_INFO(sprintf("#%d: %s: %d settings...\n", i, it.turret_name, TUR_CONFIG_COUNT));
                totalsettings += TUR_CONFIG_COUNT;
-       }));
+       });
 
        // clear queue now that we're finished
        TUR_CONFIG_COUNT = 0;