X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fconfig.qh;h=883082c97d02ed22df2c6910c1123542f2d09818;hb=d7ecf0b99095f97132ddb1252268ff7d7fb8597b;hp=05294b355e09dfbe1cbeae1ea5b7efd714dbd779;hpb=9ad0d0d4d2156d5035cdaf5c61b308dfc5291caa;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/config.qh b/qcsrc/common/weapons/config.qh index 05294b355..883082c97 100644 --- a/qcsrc/common/weapons/config.qh +++ b/qcsrc/common/weapons/config.qh @@ -1,5 +1,4 @@ -#ifndef WEAPONS_CONFIG_H -#define WEAPONS_CONFIG_H +#pragma once #ifdef SVQC // ========================== @@ -10,18 +9,15 @@ void Dump_Weapon_Settings(); int wep_config_file; bool wep_config_alsoprint; -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; \ + config_queue[WEP_CONFIG_COUNT] = a; \ ++WEP_CONFIG_COUNT; } -#define WEP_CONFIG_WRITETOFILE(a) do { \ +#define WEP_CONFIG_WRITETOFILE(a) MACRO_BEGIN \ fputs(wep_config_file, a); \ if(wep_config_alsoprint) { LOG_INFO(a); } \ -} while(0) +MACRO_END #define WEP_CONFIG_WRITE_CVARS(wepname, name, T) WEP_CONFIG_WRITE_PROPS_##T(wepname, name) @@ -37,4 +33,3 @@ string wep_config_queue[MAX_WEP_CONFIG]; cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) } #endif -#endif