1 #ifndef WEAPONS_CONFIG_H
2 #define WEAPONS_CONFIG_H
5 // ==========================
6 // Balance Config Generator
7 // ==========================
9 void Dump_Weapon_Settings();
11 bool wep_config_alsoprint;
13 const int MAX_WEP_CONFIG = 256;
15 string wep_config_queue[MAX_WEP_CONFIG];
17 #define WEP_CONFIG_QUEUE(a) { \
18 wep_config_queue[WEP_CONFIG_COUNT] = a; \
21 #define WEP_CONFIG_WRITETOFILE(a) MACRO_BEGIN { \
22 fputs(wep_config_file, a); \
23 if(wep_config_alsoprint) { LOG_INFO(a); } \
27 #define WEP_CONFIG_WRITE_CVARS(wepname, name, T) WEP_CONFIG_WRITE_PROPS_##T(wepname, name)
29 #define WEP_CONFIG_WRITE_PROPS_string(wepname, name) \
31 sprintf("set g_balance_%s_%s \"%s\"\n", #wepname, #name, \
32 cvar_string(sprintf("g_balance_%s_%s", #wepname, #name)))) }
34 #define WEP_CONFIG_WRITE_PROPS_float(wepname, name) \
36 sprintf("set g_balance_%s_%s %g\n", #wepname, #name, \
37 cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) }