]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/config.qc
Merged master
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / config.qc
index 26a05d10ac739f4b609a5ce39384be48e9ef86d8..a8194772cc69fad609edcd5e7cd1a299f69a49e8 100644 (file)
@@ -1,8 +1,8 @@
+#include "config.qh"
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-    #include "../util.qh"
-    #include "config.qh"
+    #include <common/util.qh>
     #include "all.qh"
 #endif
 
 
 void W_Config_Queue_Swap(int root, int child, entity pass)
 {
-       string oldroot = wep_config_queue[root];
-       wep_config_queue[root] = wep_config_queue[child];
-       wep_config_queue[child] = oldroot;
+       string oldroot = config_queue[root];
+       config_queue[root] = config_queue[child];
+       config_queue[child] = oldroot;
 }
 
 float W_Config_Queue_Compare(int root, int child, entity pass)
 {
-       return strcmp(wep_config_queue[root], wep_config_queue[child]);
+       return strcmp(config_queue[root], config_queue[child]);
 }
 
 void Dump_Weapon_Settings()
@@ -28,8 +28,8 @@ void Dump_Weapon_Settings()
        FOREACH(Weapons, it != WEP_Null, {
                // step 1: clear the queue
                WEP_CONFIG_COUNT = 0;
-               for (int x = 0; x <= MAX_WEP_CONFIG; ++x)
-                       { wep_config_queue[x] = string_null; }
+               for (int x = 0; x <= MAX_CONFIG_SETTINGS; ++x)
+                       config_queue[x] = string_null;
 
                // step 2: build new queue
                it.wr_config(it);
@@ -44,7 +44,7 @@ void Dump_Weapon_Settings()
                        it.m_name,
                        ((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) ? " (MUTATOR WEAPON)" : "")
                ));
-               for (int x = 0; x <= WEP_CONFIG_COUNT; ++x) { WEP_CONFIG_WRITETOFILE(wep_config_queue[x]); }
+               for (int x = 0; x <= WEP_CONFIG_COUNT; ++x) { WEP_CONFIG_WRITETOFILE(config_queue[x]); }
                WEP_CONFIG_WRITETOFILE("// }}}\n");
 
                // step 5: debug info
@@ -55,8 +55,8 @@ void Dump_Weapon_Settings()
 
        // clear queue now that we're finished
        WEP_CONFIG_COUNT = 0;
-       for(int x = 0; x <= MAX_WEP_CONFIG; ++x)
-               { wep_config_queue[x] = string_null; }
+       for(int x = 0; x <= MAX_CONFIG_SETTINGS; ++x)
+               config_queue[x] = string_null;
 
        // extra information
        LOG_INFO(sprintf("Totals: %d weapons, %d settings\n", totalweapons, totalsettings));