#include <common/teams.qh>
#include <common/util.qh>
+#ifdef GAMEQC
+#include <common/mutators/mutator/waypoints/all.qh>
+#endif
+
#ifdef GAMEQC
REGISTER_WAYPOINT(Buff, _("Buff"), "", '1 0.5 0', 1);
REGISTER_RADARICON(Buff, 1);
#endif
REGISTRY(Buffs, BITS(5))
-#define Buffs_from(i) _Buffs_from(i, BUFF_Null)
REGISTER_REGISTRY(Buffs)
REGISTRY_CHECK(Buffs)
ENDCLASS(Buff)
STATIC_INIT(REGISTER_BUFFS) {
- FOREACH(Buffs, true, {
- it.m_itemid = BIT(it.m_id - 1); \
- it.m_sprite = strzone(strcat("buff-", it.netname)); \
- });
+ FOREACH(Buffs, true, {
+ it.m_itemid = BIT(it.m_id - 1);
+ it.m_sprite = strzone(strcat("buff-", it.netname));
+ });
}
#ifdef SVQC
void buff_Init_Compat(entity ent, entity replacement);
#define BUFF_SPAWNFUNC(e, b, t) spawnfunc(item_buff_##e) { \
STAT(BUFFS, this) = b.m_itemid; \
- this.team = t; \
+ if(teamplay) \
+ this.team_forced = t; \
buff_Init(this); \
}
#define BUFF_SPAWNFUNCS(e, b) \
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(this, r); }
+ #define BUFF_SPAWNFUNC_Q3COMPAT(o, r) spawnfunc(o) { buff_Init_Compat(this, r); }
#else
#define BUFF_SPAWNFUNC(e, b, t)
#define BUFF_SPAWNFUNCS(e, b)
- #define BUFF_SPAWNFUNC_Q3TA_COMPAT(o, r)
+ #define BUFF_SPAWNFUNC_Q3COMPAT(o, r)
#endif
string Buff_UndeprecateName(string buffname);
REGISTER_BUFF(Null);
BUFF_SPAWNFUNCS(random, BUFF_Null)
+REGISTRY_DEFINE_GET(Buffs, BUFF_Null)
#include "all.inc"