Buffs: rename registry globals
authorTimePath <andrew.hardaker1995@gmail.com>
Tue, 6 Oct 2015 10:37:02 +0000 (21:37 +1100)
committerTimePath <andrew.hardaker1995@gmail.com>
Tue, 6 Oct 2015 10:37:02 +0000 (21:37 +1100)
23 files changed:
qcsrc/client/hud.qc
qcsrc/client/laser.qc
qcsrc/client/main.qc
qcsrc/client/progs.inc
qcsrc/client/t_items.qc
qcsrc/common/buffs.qc [deleted file]
qcsrc/common/buffs.qh [deleted file]
qcsrc/common/buffs/all.inc [new file with mode: 0644]
qcsrc/common/buffs/all.qc [new file with mode: 0644]
qcsrc/common/buffs/all.qh [new file with mode: 0644]
qcsrc/common/mapinfo.qc
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/nades.qc
qcsrc/common/notifications.qh
qcsrc/common/triggers/misc/laser.qc
qcsrc/common/weapons/all.qc
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/mutators/mutator_buffs.qc
qcsrc/server/mutators/mutator_instagib.qc
qcsrc/server/mutators/mutators_include.qc
qcsrc/server/progs.inc
qcsrc/server/t_quake3.qc

index cd1c6ef..1636b11 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "../dpdefs/keycodes.qh"
 
-#include "../common/buffs.qh"
+#include "../common/buffs/all.qh"
 #include "../common/constants.qh"
 #include "../common/deathtypes.qh"
 #include "../common/items/all.qc"
@@ -1283,7 +1283,7 @@ void HUD_Powerups()
        if(superTime)
                addPowerupItem("Superweapons", "superweapons", autocvar_hud_progressbar_superweapons_color, superTime, 30);
 
-       FOREACH(BUFFS, it.m_itemid & allBuffs, LAMBDA(
+       FOREACH(Buffs, it.m_itemid & allBuffs, LAMBDA(
                addPowerupItem(it.m_prettyName, strcat("buff_", it.m_name), it.m_color, bound(0, getstatf(STAT_BUFF_TIME) - time, 99), 60);
        ));
 
index f5b6d54..d023ea9 100644 (file)
@@ -3,7 +3,7 @@
 
 #include "hook.qh"
 
-#include "../common/buffs.qh"
+#include "../common/buffs/all.qh"
 
 #include "../csqcmodellib/cl_model.qh"
 #include "../csqcmodellib/interpolate.qh"
index 8ba551d..5ed049c 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "weapons/projectile.qh"
 
-#include "../common/buffs.qh"
+#include "../common/buffs/all.qh"
 #include "../common/deathtypes.qh"
 #include "../common/effects/effects.qh"
 #include "../common/mapinfo.qh"
index 39faa98..fb5853f 100644 (file)
@@ -36,7 +36,6 @@
 #include "weapons/projectile.qc" // TODO
 
 #include "../common/animdecide.qc"
-#include "../common/buffs.qc"
 #include "../common/effects/effects.qc"
 #include "../common/effects/effectinfo.qc"
 #include "../common/mapinfo.qc"
@@ -53,6 +52,7 @@
 #include "../common/minigames/minigames.qc"
 #include "../common/minigames/cl_minigames.qc"
 
+#include "../common/buffs/all.qc"
 #include "../common/items/all.qc"
 #include "../common/monsters/all.qc"
 #include "../common/mutators/all.qc"
index 3981b29..4e43a96 100644 (file)
@@ -1,6 +1,6 @@
 #include "_all.qh"
 
-#include "../common/buffs.qh"
+#include "../common/buffs/all.qh"
 #include "../common/movetypes/movetypes.qh"
 #include "../common/util.qh"
 #include "../common/weapons/all.qh"
diff --git a/qcsrc/common/buffs.qc b/qcsrc/common/buffs.qc
deleted file mode 100644 (file)
index 612255d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#if defined(CSQC)
-       #include "../dpdefs/csprogsdefs.qh"
-       #include "../client/defs.qh"
-#elif defined(MENUQC)
-#elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
-#endif
-#include "buffs.qh"
-
diff --git a/qcsrc/common/buffs.qh b/qcsrc/common/buffs.qh
deleted file mode 100644 (file)
index 31654eb..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-#ifndef BUFFS_H
-#define BUFFS_H
-// Welcome to the stuff behind the scenes
-// Below, you will find the list of buffs
-// Add new buffs here!
-// Note: Buffs also need spawnfuncs, which are set below
-
-#include "teams.qh"
-#include "util.qh"
-
-void RegisterBuffs();
-const int BUFFS_MAX = 16;
-entity BUFFS[BUFFS_MAX], BUFFS_first, BUFFS_last;
-int BUFFS_COUNT;
-#define REGISTER_BUFF(id) \
-    REGISTER(RegisterBuffs, BUFF, BUFFS, BUFFS_COUNT, id, m_id, NEW(Buff)); \
-    REGISTER_INIT_POST(BUFF, id) { \
-        this.netname = this.m_name; \
-        this.m_itemid = BIT(this.m_id - 1); \
-        this.m_sprite = strzone(strcat("buff-", this.m_name)); \
-    } \
-    REGISTER_INIT(BUFF, id)
-REGISTER_REGISTRY(RegisterBuffs)
-
-#include "items/item/pickup.qh"
-CLASS(Buff, Pickup)
-       /** bit index */
-       ATTRIB(Buff, m_itemid, int, 0)
-       ATTRIB(Buff, m_name, string, "buff")
-       ATTRIB(Buff, m_color, vector, '1 1 1')
-       ATTRIB(Buff, m_prettyName, string, "Buff")
-       ATTRIB(Buff, m_skin, int, 0)
-       ATTRIB(Buff, m_sprite, string, "")
-       METHOD(Buff, display, void(entity this, void(string name, string icon) returns)) {
-               returns(this.m_prettyName, sprintf("/gfx/hud/%s/buff_%s", cvar_string("menu_skin"), this.m_name));
-       }
-#ifdef SVQC
-       METHOD(Buff, m_time, float(entity));
-       float Buff_m_time(entity this) { return cvar(strcat("g_buffs_", this.netname, "_time")); }
-#endif
-ENDCLASS(Buff)
-
-REGISTER_BUFF(Null);
-
-REGISTER_BUFF(AMMO) {
-       this.m_prettyName = _("Ammo");
-       this.m_name = "ammo";
-       this.m_skin = 3;
-       this.m_color = '0.76 1 0.1';
-}
-
-REGISTER_BUFF(RESISTANCE) {
-       this.m_prettyName = _("Resistance");
-       this.m_name = "resistance";
-       this.m_skin = 0;
-       this.m_color = '0.36 1 0.07';
-}
-
-REGISTER_BUFF(SPEED) {
-       this.m_prettyName = _("Speed");
-       this.m_name = "speed";
-       this.m_skin = 9;
-       this.m_color = '0.1 1 0.84';
-}
-
-REGISTER_BUFF(MEDIC) {
-       this.m_prettyName = _("Medic");
-       this.m_name = "medic";
-       this.m_skin = 1;
-       this.m_color = '1 0.12 0';
-}
-
-REGISTER_BUFF(BASH) {
-       this.m_prettyName = _("Bash");
-       this.m_name = "bash";
-       this.m_skin = 5;
-       this.m_color = '1 0.39 0';
-}
-
-REGISTER_BUFF(VAMPIRE) {
-       this.m_prettyName = _("Vampire");
-       this.m_name = "vampire";
-       this.m_skin = 2;
-       this.m_color = '1 0 0.24';
-}
-
-REGISTER_BUFF(DISABILITY) {
-       this.m_prettyName = _("Disability");
-       this.m_name = "disability";
-       this.m_skin = 7;
-       this.m_color = '0.94 0.3 1';
-}
-
-REGISTER_BUFF(VENGEANCE) {
-       this.m_prettyName = _("Vengeance");
-       this.m_name = "vengeance";
-       this.m_skin = 15;
-       this.m_color = '1 0.23 0.61';
-}
-
-REGISTER_BUFF(JUMP) {
-       this.m_prettyName = _("Jump");
-       this.m_name = "jump";
-       this.m_skin = 10;
-       this.m_color = '0.24 0.78 1';
-}
-
-REGISTER_BUFF(FLIGHT) {
-       this.m_prettyName = _("Flight");
-       this.m_name = "flight";
-       this.m_skin = 11;
-       this.m_color = '0.33 0.56 1';
-}
-
-REGISTER_BUFF(INVISIBLE) {
-       this.m_prettyName = _("Invisible");
-       this.m_name = "invisible";
-       this.m_skin = 12;
-       this.m_color = '0.5 0.5 1';
-}
-
-REGISTER_BUFF(INFERNO) {
-       this.m_prettyName = _("Inferno");
-       this.m_name = "inferno";
-       this.m_skin = 16;
-       this.m_color = '1 0.62 0';
-}
-
-REGISTER_BUFF(SWAPPER) {
-       this.m_prettyName = _("Swapper");
-       this.m_name = "swapper";
-       this.m_skin = 17;
-       this.m_color = '0.63 0.36 1';
-}
-
-REGISTER_BUFF(MAGNET) {
-       this.m_prettyName = _("Magnet");
-       this.m_name = "magnet";
-       this.m_skin = 18;
-       this.m_color = '1 0.95 0.18';
-}
-
-#ifdef SVQC
-.int buffs;
-void buff_Init(entity ent);
-void buff_Init_Compat(entity ent, entity replacement);
-
-#define BUFF_SPAWNFUNC(e, b, t) spawnfunc(item_buff_##e) { \
-       self.buffs = b.m_itemid; \
-       self.team = t; \
-       buff_Init(self); \
-}
-#define BUFF_SPAWNFUNCS(e, b)                       \
-               BUFF_SPAWNFUNC(e,           b,  0)          \
-               BUFF_SPAWNFUNC(e##_team1,   b,  NUM_TEAM_1) \
-               BUFF_SPAWNFUNC(e##_team2,   b,  NUM_TEAM_2) \
-               BUFF_SPAWNFUNC(e##_team3,   b,  NUM_TEAM_3) \
-               BUFF_SPAWNFUNC(e##_team4,   b,  NUM_TEAM_4)
-#define BUFF_SPAWNFUNC_Q3TA_COMPAT(o, r) spawnfunc(item_##o) { buff_Init_Compat(self, r); }
-
-BUFF_SPAWNFUNCS(resistance,            BUFF_RESISTANCE)
-BUFF_SPAWNFUNCS(ammo,                  BUFF_AMMO)
-BUFF_SPAWNFUNCS(speed,                 BUFF_SPEED)
-BUFF_SPAWNFUNCS(medic,                 BUFF_MEDIC)
-BUFF_SPAWNFUNCS(bash,                  BUFF_BASH)
-BUFF_SPAWNFUNCS(vampire,               BUFF_VAMPIRE)
-BUFF_SPAWNFUNCS(disability,            BUFF_DISABILITY)
-BUFF_SPAWNFUNCS(vengeance,             BUFF_VENGEANCE)
-BUFF_SPAWNFUNCS(jump,                  BUFF_JUMP)
-BUFF_SPAWNFUNCS(flight,                        BUFF_FLIGHT)
-BUFF_SPAWNFUNCS(invisible,             BUFF_INVISIBLE)
-BUFF_SPAWNFUNCS(inferno,               BUFF_INFERNO)
-BUFF_SPAWNFUNCS(swapper,               BUFF_SWAPPER)
-BUFF_SPAWNFUNCS(magnet,                        BUFF_MAGNET)
-BUFF_SPAWNFUNCS(random,                        BUFF_Null)
-
-BUFF_SPAWNFUNC_Q3TA_COMPAT(doubler,    BUFF_MEDIC)
-BUFF_SPAWNFUNC_Q3TA_COMPAT(resistance, BUFF_RESISTANCE)
-BUFF_SPAWNFUNC_Q3TA_COMPAT(scout,      BUFF_SPEED)
-BUFF_SPAWNFUNC_Q3TA_COMPAT(ammoregen,  BUFF_AMMO)
-
-// actually Q3
-BUFF_SPAWNFUNC_Q3TA_COMPAT(haste,      BUFF_SPEED)
-BUFF_SPAWNFUNC_Q3TA_COMPAT(invis,      BUFF_INVISIBLE)
-BUFF_SPAWNFUNC_Q3TA_COMPAT(medic,      BUFF_MEDIC)
-
-#undef BUFF_SPAWNFUNC
-#undef BUFF_SPAWNFUNC_Q3TA_COMPAT
-#undef BUFF_SPAWNFUNCS
-#endif
-
-#endif
diff --git a/qcsrc/common/buffs/all.inc b/qcsrc/common/buffs/all.inc
new file mode 100644 (file)
index 0000000..25fa722
--- /dev/null
@@ -0,0 +1,118 @@
+REGISTER_BUFF(AMMO) {
+    this.m_prettyName = _("Ammo");
+    this.m_name = "ammo";
+    this.m_skin = 3;
+    this.m_color = '0.76 1 0.1';
+}
+BUFF_SPAWNFUNCS(ammo, BUFF_AMMO)
+BUFF_SPAWNFUNC_Q3TA_COMPAT(ammoregen, BUFF_AMMO)
+
+REGISTER_BUFF(RESISTANCE) {
+    this.m_prettyName = _("Resistance");
+    this.m_name = "resistance";
+    this.m_skin = 0;
+    this.m_color = '0.36 1 0.07';
+}
+BUFF_SPAWNFUNCS(resistance, BUFF_RESISTANCE)
+BUFF_SPAWNFUNC_Q3TA_COMPAT(resistance, BUFF_RESISTANCE)
+
+REGISTER_BUFF(SPEED) {
+    this.m_prettyName = _("Speed");
+    this.m_name = "speed";
+    this.m_skin = 9;
+    this.m_color = '0.1 1 0.84';
+}
+BUFF_SPAWNFUNCS(speed, BUFF_SPEED)
+BUFF_SPAWNFUNC_Q3TA_COMPAT(haste, BUFF_SPEED)
+BUFF_SPAWNFUNC_Q3TA_COMPAT(scout, BUFF_SPEED)
+
+REGISTER_BUFF(MEDIC) {
+    this.m_prettyName = _("Medic");
+    this.m_name = "medic";
+    this.m_skin = 1;
+    this.m_color = '1 0.12 0';
+}
+BUFF_SPAWNFUNCS(medic, BUFF_MEDIC)
+BUFF_SPAWNFUNC_Q3TA_COMPAT(doubler, BUFF_MEDIC)
+BUFF_SPAWNFUNC_Q3TA_COMPAT(medic, BUFF_MEDIC)
+
+REGISTER_BUFF(BASH) {
+    this.m_prettyName = _("Bash");
+    this.m_name = "bash";
+    this.m_skin = 5;
+    this.m_color = '1 0.39 0';
+}
+BUFF_SPAWNFUNCS(bash, BUFF_BASH)
+
+REGISTER_BUFF(VAMPIRE) {
+    this.m_prettyName = _("Vampire");
+    this.m_name = "vampire";
+    this.m_skin = 2;
+    this.m_color = '1 0 0.24';
+}
+BUFF_SPAWNFUNCS(vampire, BUFF_VAMPIRE)
+
+REGISTER_BUFF(DISABILITY) {
+    this.m_prettyName = _("Disability");
+    this.m_name = "disability";
+    this.m_skin = 7;
+    this.m_color = '0.94 0.3 1';
+}
+BUFF_SPAWNFUNCS(disability, BUFF_DISABILITY)
+
+REGISTER_BUFF(VENGEANCE) {
+    this.m_prettyName = _("Vengeance");
+    this.m_name = "vengeance";
+    this.m_skin = 15;
+    this.m_color = '1 0.23 0.61';
+}
+BUFF_SPAWNFUNCS(vengeance, BUFF_VENGEANCE)
+
+REGISTER_BUFF(JUMP) {
+    this.m_prettyName = _("Jump");
+    this.m_name = "jump";
+    this.m_skin = 10;
+    this.m_color = '0.24 0.78 1';
+}
+BUFF_SPAWNFUNCS(jump, BUFF_JUMP)
+
+REGISTER_BUFF(FLIGHT) {
+    this.m_prettyName = _("Flight");
+    this.m_name = "flight";
+    this.m_skin = 11;
+    this.m_color = '0.33 0.56 1';
+}
+BUFF_SPAWNFUNCS(flight, BUFF_FLIGHT)
+
+REGISTER_BUFF(INVISIBLE) {
+    this.m_prettyName = _("Invisible");
+    this.m_name = "invisible";
+    this.m_skin = 12;
+    this.m_color = '0.5 0.5 1';
+}
+BUFF_SPAWNFUNCS(invisible, BUFF_INVISIBLE)
+BUFF_SPAWNFUNC_Q3TA_COMPAT(invis, BUFF_INVISIBLE)
+
+REGISTER_BUFF(INFERNO) {
+    this.m_prettyName = _("Inferno");
+    this.m_name = "inferno";
+    this.m_skin = 16;
+    this.m_color = '1 0.62 0';
+}
+BUFF_SPAWNFUNCS(inferno, BUFF_INFERNO)
+
+REGISTER_BUFF(SWAPPER) {
+    this.m_prettyName = _("Swapper");
+    this.m_name = "swapper";
+    this.m_skin = 17;
+    this.m_color = '0.63 0.36 1';
+}
+BUFF_SPAWNFUNCS(swapper, BUFF_SWAPPER)
+
+REGISTER_BUFF(MAGNET) {
+    this.m_prettyName = _("Magnet");
+    this.m_name = "magnet";
+    this.m_skin = 18;
+    this.m_color = '1 0.95 0.18';
+}
+BUFF_SPAWNFUNCS(magnet, BUFF_MAGNET)
diff --git a/qcsrc/common/buffs/all.qc b/qcsrc/common/buffs/all.qc
new file mode 100644 (file)
index 0000000..56e9b1e
--- /dev/null
@@ -0,0 +1,10 @@
+#if defined(CSQC)
+       #include "../dpdefs/csprogsdefs.qh"
+       #include "../client/defs.qh"
+#elif defined(MENUQC)
+#elif defined(SVQC)
+       #include "../dpdefs/progsdefs.qh"
+    #include "../dpdefs/dpextensions.qh"
+#endif
+#include "all.qh"
+
diff --git a/qcsrc/common/buffs/all.qh b/qcsrc/common/buffs/all.qh
new file mode 100644 (file)
index 0000000..4cf371b
--- /dev/null
@@ -0,0 +1,68 @@
+#ifndef BUFFS_ALL_H
+#define BUFFS_ALL_H
+// Welcome to the stuff behind the scenes
+// Below, you will find the list of buffs
+// Add new buffs here!
+// Note: Buffs also need spawnfuncs, which are set below
+
+#include "../teams.qh"
+#include "../util.qh"
+
+REGISTRY(Buffs, 16)
+REGISTER_REGISTRY(RegisterBuffs)
+
+#define REGISTER_BUFF(id) \
+    REGISTER(RegisterBuffs, BUFF, Buffs, Buffs_COUNT, id, m_id, NEW(Buff)); \
+    REGISTER_INIT_POST(BUFF, id) { \
+        this.netname = this.m_name; \
+        this.m_itemid = BIT(this.m_id - 1); \
+        this.m_sprite = strzone(strcat("buff-", this.m_name)); \
+    } \
+    REGISTER_INIT(BUFF, id)
+
+#include "../items/item/pickup.qh"
+CLASS(Buff, Pickup)
+       /** bit index */
+       ATTRIB(Buff, m_itemid, int, 0)
+       ATTRIB(Buff, m_name, string, "buff")
+       ATTRIB(Buff, m_color, vector, '1 1 1')
+       ATTRIB(Buff, m_prettyName, string, "Buff")
+       ATTRIB(Buff, m_skin, int, 0)
+       ATTRIB(Buff, m_sprite, string, "")
+       METHOD(Buff, display, void(entity this, void(string name, string icon) returns)) {
+               returns(this.m_prettyName, sprintf("/gfx/hud/%s/buff_%s", cvar_string("menu_skin"), this.m_name));
+       }
+#ifdef SVQC
+       METHOD(Buff, m_time, float(entity));
+       float Buff_m_time(entity this) { return cvar(strcat("g_buffs_", this.netname, "_time")); }
+#endif
+ENDCLASS(Buff)
+
+#ifdef SVQC
+       .int buffs;
+       void buff_Init(entity ent);
+       void buff_Init_Compat(entity ent, entity replacement);
+       #define BUFF_SPAWNFUNC(e, b, t) spawnfunc(item_buff_##e) { \
+               self.buffs = b.m_itemid; \
+               self.team = t; \
+               buff_Init(self); \
+       }
+       #define BUFF_SPAWNFUNCS(e, b)                       \
+                       BUFF_SPAWNFUNC(e,           b,  0)          \
+                       BUFF_SPAWNFUNC(e##_team1,   b,  NUM_TEAM_1) \
+                       BUFF_SPAWNFUNC(e##_team2,   b,  NUM_TEAM_2) \
+                       BUFF_SPAWNFUNC(e##_team3,   b,  NUM_TEAM_3) \
+                       BUFF_SPAWNFUNC(e##_team4,   b,  NUM_TEAM_4)
+       #define BUFF_SPAWNFUNC_Q3TA_COMPAT(o, r) spawnfunc(item_##o) { buff_Init_Compat(self, r); }
+#else
+       #define BUFF_SPAWNFUNC(e, b, t)
+       #define BUFF_SPAWNFUNCS(e, b)
+       #define BUFF_SPAWNFUNC_Q3TA_COMPAT(o, r)
+#endif
+
+REGISTER_BUFF(Null);
+BUFF_SPAWNFUNCS(random, BUFF_Null)
+
+#include "all.inc"
+
+#endif
index b17f2e7..8c898cc 100644 (file)
@@ -2,7 +2,7 @@
        #include "../dpdefs/csprogsdefs.qh"
     #include "../client/defs.qh"
     #include "util.qh"
-    #include "buffs.qh"
+    #include "buffs/all.qh"
     #include "weapons/all.qh"
     #include "mapinfo.qh"
 #elif defined(MENUQC)
@@ -10,7 +10,7 @@
        #include "../dpdefs/progsdefs.qh"
     #include "../dpdefs/dpextensions.qh"
     #include "util.qh"
-    #include "buffs.qh"
+    #include "buffs/all.qh"
     #include "monsters/all.qh"
     #include "mapinfo.qh"
 #endif
index a083ae1..d06fb61 100644 (file)
@@ -246,7 +246,7 @@ vector spritelookupcolor(string s, vector def)
 {SELFPARAM();
     if (s == WP_Weapon.netname) return get_weaponinfo(self.wp_extra).wpcolor;
     if (s == WP_Item.netname) return Items[self.wp_extra].m_color;
-    if (s == WP_Buff.netname) return BUFFS[self.wp_extra].m_color;
+    if (s == WP_Buff.netname) return Buffs[self.wp_extra].m_color;
     return def;
 }
 
@@ -255,7 +255,7 @@ string spritelookuptext(string s)
     if (s == WP_RaceStartFinish.netname) return (race_checkpointtime || race_mycheckpointtime) ? _("Finish") : _("Start");
     if (s == WP_Weapon.netname) return get_weaponinfo(self.wp_extra).message;
     if (s == WP_Item.netname) return Items[self.wp_extra].m_waypoint;
-    if (s == WP_Buff.netname) return BUFFS[self.wp_extra].m_prettyName;
+    if (s == WP_Buff.netname) return Buffs[self.wp_extra].m_prettyName;
     if (s == WP_Monster.netname) return get_monsterinfo(self.wp_extra).monster_name;
 
     // need to loop, as our netname could be one of three
index f0e72b7..a6b0000 100644 (file)
@@ -2,7 +2,7 @@
        #include "../dpdefs/csprogsdefs.qh"
        #include "../client/defs.qh"
        #include "nades.qh"
-       #include "buffs.qh"
+       #include "buffs/all.qh"
        #include "../common/movetypes/movetypes.qh"
        #include "../client/main.qh"
        #include "../csqcmodellib/cl_model.qh"
index d44a651..01d6cbe 100644 (file)
@@ -265,8 +265,8 @@ const float ARG_DC = 6; // unique result to durcnt/centerprint
     ARG_CASE(ARG_CS_SV,     "spree_end",     (autocvar_notification_show_sprees ? notif_arg_spree_inf(-1, "", "", f1) : "")) \
     ARG_CASE(ARG_CS_SV,     "spree_lost",    (autocvar_notification_show_sprees ? notif_arg_spree_inf(-2, "", "", f1) : "")) \
     ARG_CASE(ARG_CS_SV,     "item_wepname",  WEP_NAME(f1)) \
-    ARG_CASE(ARG_CS_SV,     "item_buffname", sprintf("%s%s", rgb_to_hexcolor(BUFFS[f1].m_color), BUFFS[f1].m_prettyName)) \
-    ARG_CASE(ARG_CS_SV,     "f3buffname",    sprintf("%s%s", rgb_to_hexcolor(BUFFS[f3].m_color), BUFFS[f3].m_prettyName)) \
+    ARG_CASE(ARG_CS_SV,     "item_buffname", sprintf("%s%s", rgb_to_hexcolor(Buffs[f1].m_color), Buffs[f1].m_prettyName)) \
+    ARG_CASE(ARG_CS_SV,     "f3buffname",    sprintf("%s%s", rgb_to_hexcolor(Buffs[f3].m_color), Buffs[f3].m_prettyName)) \
     ARG_CASE(ARG_CS_SV,     "item_wepammo",  (s1 != "" ? sprintf(_(" with %s"), s1) : "")) \
     ARG_CASE(ARG_DC,        "item_centime",  ftos(autocvar_notification_item_centerprinttime)) \
     ARG_CASE(ARG_SV,        "death_team",    Team_ColoredFullName(f1)) \
index ec4a9e2..5f7707d 100644 (file)
@@ -1,6 +1,6 @@
 #if defined(CSQC)
        #include "../../../client/_all.qh"
-       #include "../../buffs.qh"
+       #include "../../buffs/all.qh"
        #include "../../../csqcmodellib/interpolate.qh"
        #include "../../../client/main.qh"
        #include "../../../csqcmodellib/cl_model.qh"
index 8552f97..2c72d38 100644 (file)
@@ -12,7 +12,7 @@
        #include "../../warpzonelib/common.qh"
        #include "../../warpzonelib/client.qh"
        #include "../util.qh"
-       #include "../buffs.qh"
+       #include "../buffs/all.qh"
        #include "../../client/autocvars.qh"
        #include "../deathtypes.qh"
        #include "../../csqcmodellib/interpolate.qh"
@@ -31,7 +31,7 @@
     #include "../stats.qh"
     #include "../teams.qh"
     #include "../util.qh"
-    #include "../buffs.qh"
+    #include "../buffs/all.qh"
     #include "../monsters/all.qh"
     #include "config.qh"
     #include "../../server/weapons/csqcprojectile.qh"
index 11812f8..840ffe5 100644 (file)
@@ -10,7 +10,7 @@
 #include "weapons/accuracy.qh"
 #include "weapons/csqcprojectile.qh"
 #include "weapons/selection.qh"
-#include "../common/buffs.qh"
+#include "../common/buffs/all.qh"
 #include "../common/constants.qh"
 #include "../common/deathtypes.qh"
 #include "../common/notifications.qh"
index 0e550db..654c8a7 100644 (file)
@@ -19,7 +19,7 @@
 #include "scores.qh"
 #include "teamplay.qh"
 #include "weapons/weaponstats.qh"
-#include "../common/buffs.qh"
+#include "../common/buffs/all.qh"
 #include "../common/constants.qh"
 #include "../common/deathtypes.qh"
 #include "../common/effects/effects.qh"
index fb0c2b7..da47be4 100644 (file)
@@ -4,13 +4,13 @@
 
 #include "mutator.qh"
 
-#include "../../common/buffs.qh"
+#include "../../common/buffs/all.qh"
 
 entity buff_FirstFromFlags(int _buffs)
 {
        if (flags)
        {
-               FOREACH(BUFFS, it.m_itemid & _buffs, LAMBDA(return it));
+               FOREACH(Buffs, it.m_itemid & _buffs, LAMBDA(return it));
        }
        return BUFF_Null;
 }
@@ -211,7 +211,7 @@ float buff_Available(entity buff)
 void buff_NewType(entity ent, float cb)
 {
        RandomSelection_Init();
-       FOREACH(BUFFS, buff_Available(it), LAMBDA(
+       FOREACH(Buffs, buff_Available(it), LAMBDA(
                it.buff_seencount += 1;
                // if it's already been chosen, give it a lower priority
                RandomSelection_Add(world, it.m_itemid, string_null, 1, max(0.2, 1 / it.buff_seencount));
index 5f057e5..9f88b2b 100644 (file)
@@ -3,7 +3,7 @@
 #include "mutator.qh"
 
 #include "../cl_client.qh"
-#include "../../common/buffs.qh"
+#include "../../common/buffs/all.qh"
 
 #include "../../common/items/all.qc"
 
index 8e9a665..8b432d3 100644 (file)
@@ -12,7 +12,7 @@
     #include "../../common/teams.qh"
     #include "../../common/util.qh"
     #include "../../common/nades.qh"
-    #include "../../common/buffs.qh"
+    #include "../../common/buffs/all.qh"
     #include "../../common/command/markup.qh"
     #include "../../common/command/rpn.qh"
     #include "../../common/command/generic.qh"
index 52cf270..d9dec8f 100644 (file)
@@ -79,7 +79,6 @@
 #include "weapons/weaponsystem.qc"
 
 #include "../common/animdecide.qc"
-#include "../common/buffs.qc"
 #include "../common/campaign_file.qc"
 #include "../common/campaign_setup.qc"
 #include "../common/effects/effects.qc"
@@ -99,6 +98,7 @@
 #include "../common/triggers/include.qc"
 #include "../common/util.qc"
 
+#include "../common/buffs/all.qc"
 #include "../common/items/all.qc"
 #include "../common/monsters/all.qc"
 #include "../common/mutators/all.qc"
index 8eecc5e..c8f5957 100644 (file)
@@ -1,7 +1,7 @@
 #include "_all.qh"
 
 #include "../common/weapons/all.qh"
-#include "../common/buffs.qh"
+#include "../common/buffs/all.qh"
 
 spawnfunc(weapon_crylink);
 spawnfunc(weapon_electro);