// ========================== // Balance Config Generator // ========================== void Dump_Weapon_Settings(float fh, float alsoprint); float wep_config_file; float wep_config_alsoprint; #define WEP_CONFIG_WRITE(a) { \ fputs(wep_config_file, a); \ if(wep_config_alsoprint) { print(a); } } #define WEP_CONFIG_WRITE_CVARS(weapon,mode,name) \ #if mode == MO_PRI \ WEP_CONFIG_WRITE(sprintf("set g_balance_%s_primary_%s", #weapon, #name)) \ #endif \ #if mode == MO_SEC \ WEP_CONFIG_WRITE(sprintf("set g_balance_%s_secondary_%s", #weapon, #name)) \ #endif \ #if mode == MO_BOTH \ WEP_CONFIG_WRITE(sprintf("set g_balance_%s_primary_%s", #weapon, #name)) \ WEP_CONFIG_WRITE(sprintf("set g_balance_%s_secondary_%s", #weapon, #name)) \ #endif \ #if mode == MO_NONE \ WEP_CONFIG_WRITE(sprintf("set g_balance_%s_%s", #weapon, #name)) \ #endif #define WEP_CONFIG_WRITE_PROPS(weapon,prop,name) \ { WEP_CONFIG_WRITE(sprintf("set g_balance_%s_%s", #weapon, #name)) }