X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fconfig.qh;h=affba63a09fef4b252a3810621a7de4c4b05f264;hb=ba0988ca930f50286f8cf3b6c114ebc6584964af;hp=6a0489314849cd47bfee81208355e02dd79a5852;hpb=a5b077eb799e456094034cdc0dd0d5b5a7e1119e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/config.qh b/qcsrc/common/weapons/config.qh index 6a0489314..affba63a0 100644 --- a/qcsrc/common/weapons/config.qh +++ b/qcsrc/common/weapons/config.qh @@ -1,22 +1,59 @@ +#ifndef WEAPONS_CONFIG_H +#define WEAPONS_CONFIG_H + +#if defined(CSQC) +#elif defined(MENUQC) +#elif defined(SVQC) + #include "../util-pre.qh" + #include "../../server/sys-pre.qh" + #include "../../dpdefs/progsdefs.qc" + #include "../../dpdefs/dpextensions.qc" + #include "../../server/sys-post.qh" + #include "../../warpzonelib/anglestransform.qh" + #include "../../warpzonelib/mathlib.qh" + #include "../../warpzonelib/common.qh" + #include "../../warpzonelib/util_server.qh" + #include "../../warpzonelib/server.qh" + #include "../constants.qh" + #include "../stats.qh" + #include "../teams.qh" + #include "../util.qh" + #include "../nades.qh" + #include "../buffs.qh" + #include "../test.qh" + #include "../counting.qh" + #include "../urllib.qh" + #include "../command/markup.qh" + #include "../command/rpn.qh" + #include "../command/generic.qh" + #include "../command/shared_defs.qh" + #include "../net_notice.qh" + #include "../animdecide.qh" + #include "../monsters/monsters.qh" + #include "../monsters/sv_monsters.qh" + #include "../monsters/spawn.qh" +#endif + // ========================== // 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) { print(a); } \ +} while(0) #define WEP_CONFIG_WRITE_CVARS_NONE(wepname,name) \ { WEP_CONFIG_QUEUE( \ @@ -42,3 +79,4 @@ 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 \ No newline at end of file