X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Fweapons%2Fconfig.qh;h=b842684984cc8dce14f35866716faacc3f26b45c;hb=565754a35f9e84a3b8e6eac08635ec27145b369a;hp=b21bf017029dd45e329fa0cb4a9068d2110ead0e;hpb=44aa8946945001e43f22bb2ca8c7b725dc8c9513;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/config.qh b/qcsrc/common/weapons/config.qh index b21bf0170..b84268498 100644 --- a/qcsrc/common/weapons/config.qh +++ b/qcsrc/common/weapons/config.qh @@ -10,21 +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; } - +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