]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 cd1c6efee469a440314f01ff9e08a85f2663af22..1636b11e7d59d64842148bae48860a2f96534f12 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 f5b6d54a9b32bd8df2fe39d95591981d124a28c7..d023ea9b59957e72f52ee8114f1c91fcb1ee43b3 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 8ba551d9c3c2011c00a551a06fbb1211869d028f..5ed049c609619664da47f18d03451e3a9dbbadc6 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 39faa989edde675731ed543944ccf87794bd0113..fb5853f078b19acbe3672565db2227f6dcd00dd6 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 3981b29eb85fdca9f6f9384cb321b2308a1917c2..4e43a9662469377c2f2c383c47bddb5cf5b6b5ae 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 b17f2e7ba0b38b2b84b604121db1f8b8e4530a9a..8c898cc54992fe6b9ed674b7768bb563a11838f5 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 a083ae15925684cb8c67ca1eff236944ce62ea32..d06fb617208c3aeeec384a949b3dbd5fc918e02b 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 f0e72b7ecc99aa0905d604cc1b5894d9c907a002..a6b00002591704fa1c8ad3bf42bc52b990ca0edc 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 d44a651567f767b95ed80da560fea7bf22794587..01d6cbe5538e2207c295c08906ca543aa8c40acf 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 ec4a9e277a09e5bf5770180dc718bb6781541d90..5f7707d5b2bf02364fb52e94807cedb8acc2e19d 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 8552f97300f70be6b51e85e5bd2af76787fe1e95..2c72d380fcc8db9274203062ce8685de3882fad6 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 11812f85c139652ed2e143ef74e3dda9e0bce682..840ffe5c5d4a98315ebaf608ffe4cd03a817e928 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 0e550db1e46979abd1ac7cbb137beae0c0458f0e..654c8a77ab07d62770a419eb776683b358d7e824 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 fb0c2b7b6feb8dec218c58d58e04b5ebb59688c4..da47be4159c0a1accf0f4e4b336e57923dc55400 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 5f057e582dd77d9df74a8baf79a2bdbaf4d54e87..9f88b2b6e8d40638bf96346da31f399929dd94e6 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 8e9a66583402c11ae23cb7452c088395439378fc..8b432d3bfc08be08b9f3a78fa7b3b63b1f3eaded 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 52cf270bff100147d2fbb63994c33d7a611c222f..d9dec8f6f3925a5a50fe10547b74a3eefe3d83d0 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 8eecc5ee3ba67d16d14204ca3776eee16adcd6b1..c8f595761d0b6e03ad911b66cb6f1c7080f1b82a 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);