X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fconfig.qh;h=c50c1e544041fc2a8960b214371c3df27c1d9a14;hb=6934dfd60d93f449ce426b2ff52daa6cc03cef52;hp=6a0489314849cd47bfee81208355e02dd79a5852;hpb=b2a0a591474681192b67caeb100f65ced41708b7;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/config.qh b/qcsrc/common/weapons/config.qh index 6a0489314..c50c1e544 100644 --- a/qcsrc/common/weapons/config.qh +++ b/qcsrc/common/weapons/config.qh @@ -1,22 +1,27 @@ +#ifndef WEAPONS_CONFIG_H +#define WEAPONS_CONFIG_H + +#ifdef SVQC // ========================== // Balance Config Generator // ========================== void Dump_Weapon_Settings(void); -float wep_config_file; -float wep_config_alsoprint; +int wep_config_file; +bool wep_config_alsoprint; -#define MAX_WEP_CONFIG 256 -float WEP_CONFIG_COUNT; +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) { \ +#define WEP_CONFIG_WRITETOFILE(a) do { \ fputs(wep_config_file, a); \ - if(wep_config_alsoprint) { print(a); } } + if(wep_config_alsoprint) { LOG_INFO(a); } \ +} while(0) #define WEP_CONFIG_WRITE_CVARS_NONE(wepname,name) \ { WEP_CONFIG_QUEUE( \ @@ -28,7 +33,7 @@ string wep_config_queue[MAX_WEP_CONFIG]; #define WEP_CONFIG_WRITE_CVARS_BOTH(wepname,name) \ WEP_CONFIG_WRITE_CVARS_PRI(wepname, name) \ WEP_CONFIG_WRITE_CVARS_SEC(wepname, name) - + #define WEP_CONFIG_WRITE_CVARS(wepid,wepname,mode,name) WEP_CONFIG_WRITE_CVARS_##mode(wepname, name) #define WEP_CONFIG_WRITE_PROPS_string(wepname,name) \ @@ -42,3 +47,5 @@ string wep_config_queue[MAX_WEP_CONFIG]; cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) } #define WEP_CONFIG_WRITE_PROPS(wepid,wepname,type,prop,name) WEP_CONFIG_WRITE_PROPS_##type(wepname,name) +#endif +#endif