X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fconfig.qh;h=b842684984cc8dce14f35866716faacc3f26b45c;hb=af6032d7f97d3915ab37dca9f4ec2111a1bbf0c7;hp=9489843654f89db445a844973a14b6cd270f8e65;hpb=0e7e4e527797decf984c68638fee5c3ca656f958;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/config.qh b/qcsrc/common/weapons/config.qh index 948984365..b84268498 100644 --- a/qcsrc/common/weapons/config.qh +++ b/qcsrc/common/weapons/config.qh @@ -10,26 +10,20 @@ int wep_config_file; bool wep_config_alsoprint; int WEP_CONFIG_COUNT; -#define WEP_CONFIG_QUEUE(a) { \ - 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