1 #ifndef WEAPONS_CONFIG_H
2 #define WEAPONS_CONFIG_H
7 #include "../util-pre.qh"
8 #include "../../server/sys-pre.qh"
9 #include "../../dpdefs/progsdefs.qh"
10 #include "../../dpdefs/dpextensions.qh"
11 #include "../../server/sys-post.qh"
12 #include "../../warpzonelib/anglestransform.qh"
13 #include "../../warpzonelib/mathlib.qh"
14 #include "../../warpzonelib/common.qh"
15 #include "../../warpzonelib/util_server.qh"
16 #include "../../warpzonelib/server.qh"
17 #include "../constants.qh"
18 #include "../stats.qh"
19 #include "../teams.qh"
21 #include "../nades.qh"
22 #include "../buffs.qh"
24 #include "../counting.qh"
25 #include "../urllib.qh"
26 #include "../command/markup.qh"
27 #include "../command/rpn.qh"
28 #include "../command/generic.qh"
29 #include "../command/shared_defs.qh"
30 #include "../net_notice.qh"
31 #include "../animdecide.qh"
32 #include "../monsters/monsters.qh"
33 #include "../monsters/sv_monsters.qh"
34 #include "../monsters/spawn.qh"
37 // ==========================
38 // Balance Config Generator
39 // ==========================
41 void Dump_Weapon_Settings(void);
43 bool wep_config_alsoprint;
45 const int MAX_WEP_CONFIG = 256;
47 string wep_config_queue[MAX_WEP_CONFIG];
49 #define WEP_CONFIG_QUEUE(a) { \
50 wep_config_queue[WEP_CONFIG_COUNT] = a; \
53 #define WEP_CONFIG_WRITETOFILE(a) do { \
54 fputs(wep_config_file, a); \
55 if(wep_config_alsoprint) { print(a); } \
58 #define WEP_CONFIG_WRITE_CVARS_NONE(wepname,name) \
60 sprintf("set g_balance_%s_%s %g\n", #wepname, #name, \
61 cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) }
63 #define WEP_CONFIG_WRITE_CVARS_PRI(wepname,name) WEP_CONFIG_WRITE_CVARS_NONE(wepname, primary_##name)
64 #define WEP_CONFIG_WRITE_CVARS_SEC(wepname,name) WEP_CONFIG_WRITE_CVARS_NONE(wepname, secondary_##name)
65 #define WEP_CONFIG_WRITE_CVARS_BOTH(wepname,name) \
66 WEP_CONFIG_WRITE_CVARS_PRI(wepname, name) \
67 WEP_CONFIG_WRITE_CVARS_SEC(wepname, name)
69 #define WEP_CONFIG_WRITE_CVARS(wepid,wepname,mode,name) WEP_CONFIG_WRITE_CVARS_##mode(wepname, name)
71 #define WEP_CONFIG_WRITE_PROPS_string(wepname,name) \
73 sprintf("set g_balance_%s_%s \"%s\"\n", #wepname, #name, \
74 cvar_string(sprintf("g_balance_%s_%s", #wepname, #name)))) }
76 #define WEP_CONFIG_WRITE_PROPS_float(wepname,name) \
78 sprintf("set g_balance_%s_%s %g\n", #wepname, #name, \
79 cvar(sprintf("g_balance_%s_%s", #wepname, #name)))) }
81 #define WEP_CONFIG_WRITE_PROPS(wepid,wepname,type,prop,name) WEP_CONFIG_WRITE_PROPS_##type(wepname,name)