]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/config.qh
Fix FL_WEAPON flag overlapping FL_JUMPRELEASED. This unintentional change was introdu...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / config.qh
index 753147307b3a253e9fb86b5b056bcbdab222c096..b842684984cc8dce14f35866716faacc3f26b45c 100644 (file)
@@ -9,30 +9,21 @@ void Dump_Weapon_Settings();
 int wep_config_file;
 bool wep_config_alsoprint;
 
-const int MAX_WEP_CONFIG = 256;
 int WEP_CONFIG_COUNT;
-string wep_config_queue[MAX_WEP_CONFIG];
-
-#define WEP_CONFIG_QUEUE(a) { \
-       wep_config_queue[WEP_CONFIG_COUNT] = a; \
-       ++WEP_CONFIG_COUNT; }
-
-#define WEP_CONFIG_WRITETOFILE(a) MACRO_BEGIN { \
-       fputs(wep_config_file, a); \
-       if(wep_config_alsoprint) { LOG_INFO(a); } \
-} MACRO_END
-
+void W_Config_Queue(string setting);
 
 #define WEP_CONFIG_WRITE_CVARS(wepname, name, T) WEP_CONFIG_WRITE_PROPS_##T(wepname, name)
 
-#define WEP_CONFIG_WRITE_PROPS_string(wepname, name) \
-       { WEP_CONFIG_QUEUE( \
+#define WEP_CONFIG_WRITE_PROPS_string(wepname, name) {\
+       W_Config_Queue( \
                sprintf("set g_balance_%s_%s \"%s\"\n", #wepname, #name, \
-               cvar_string(sprintf("g_balance_%s_%s", #wepname, #name)))) }
+               cvar_string(sprintf("g_balance_%s_%s", #wepname, #name)))); \
+}
 
-#define WEP_CONFIG_WRITE_PROPS_float(wepname, name) \
-       { WEP_CONFIG_QUEUE( \
+#define WEP_CONFIG_WRITE_PROPS_float(wepname, name) {\
+       W_Config_Queue( \
                sprintf("set g_balance_%s_%s %g\n", #wepname, #name, \
-               cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) }
+               cvar(sprintf("g_balance_%s_%s", #wepname, #name)))); \
+}
 
 #endif