REGISTRY_DEPENDS(Items, Models)
#endif
REGISTER_REGISTRY(Items)
-#define REGISTER_ITEM(id, class) REGISTER(Items, ITEM, id, m_id, NEW(class))
+#define REGISTER_ITEM(id, inst) REGISTER(Items, ITEM, id, m_id, inst)
#ifdef CSQC
// Copy Items registry here before it gets sorted alphabetically by REGISTRY_SORT
}
ENDCLASS(Shells)
-REGISTER_ITEM(Shells, Shells) {
+REGISTER_ITEM(Shells, NEW(Shells)) {
this.m_canonical_spawnfunc = "item_shells";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(Bullets)
-REGISTER_ITEM(Bullets, Bullets) {
+REGISTER_ITEM(Bullets, NEW(Bullets)) {
this.m_canonical_spawnfunc = "item_bullets";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(Rockets)
-REGISTER_ITEM(Rockets, Rockets) {
+REGISTER_ITEM(Rockets, NEW(Rockets)) {
this.m_canonical_spawnfunc = "item_rockets";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(Cells)
-REGISTER_ITEM(Cells, Cells) {
+REGISTER_ITEM(Cells, NEW(Cells)) {
this.m_canonical_spawnfunc = "item_cells";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(ArmorSmall)
-REGISTER_ITEM(ArmorSmall, ArmorSmall) {
+REGISTER_ITEM(ArmorSmall, NEW(ArmorSmall)) {
this.m_canonical_spawnfunc = "item_armor_small";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(ArmorMedium)
-REGISTER_ITEM(ArmorMedium, ArmorMedium) {
+REGISTER_ITEM(ArmorMedium, NEW(ArmorMedium)) {
this.m_canonical_spawnfunc = "item_armor_medium";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(ArmorBig)
-REGISTER_ITEM(ArmorBig, ArmorBig) {
+REGISTER_ITEM(ArmorBig, NEW(ArmorBig)) {
this.m_canonical_spawnfunc = "item_armor_big";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(ArmorMega)
-REGISTER_ITEM(ArmorMega, ArmorMega) {
+REGISTER_ITEM(ArmorMega, NEW(ArmorMega)) {
this.m_canonical_spawnfunc = "item_armor_mega";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(HealthSmall)
-REGISTER_ITEM(HealthSmall, HealthSmall) {
+REGISTER_ITEM(HealthSmall, NEW(HealthSmall)) {
this.m_canonical_spawnfunc = "item_health_small";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(HealthMedium)
-REGISTER_ITEM(HealthMedium, HealthMedium) {
+REGISTER_ITEM(HealthMedium, NEW(HealthMedium)) {
this.m_canonical_spawnfunc = "item_health_medium";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(HealthBig)
-REGISTER_ITEM(HealthBig, HealthBig) {
+REGISTER_ITEM(HealthBig, NEW(HealthBig)) {
this.m_canonical_spawnfunc = "item_health_big";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(HealthMega)
-REGISTER_ITEM(HealthMega, HealthMega) {
+REGISTER_ITEM(HealthMega, NEW(HealthMega)) {
this.m_canonical_spawnfunc = "item_health_mega";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(Jetpack)
-REGISTER_ITEM(Jetpack, Jetpack) {
+REGISTER_ITEM(Jetpack, NEW(Jetpack)) {
this.m_canonical_spawnfunc = "item_jetpack";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL;
SetResourceExplicit(item, RES_FUEL, g_pickup_fuel);
}
#endif
-REGISTER_ITEM(JetpackFuel, JetpackFuel) {
+REGISTER_ITEM(JetpackFuel, NEW(JetpackFuel)) {
this.m_canonical_spawnfunc = "item_fuel";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
ENDCLASS(JetpackRegen)
-REGISTER_ITEM(JetpackRegen, JetpackRegen) {
+REGISTER_ITEM(JetpackRegen, NEW(JetpackRegen)) {
this.m_canonical_spawnfunc = "item_fuel_regen";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL;
CLASS(NullMonster, Monster)
ATTRIB(NullMonster, m_hidden, bool, true);
ENDCLASS(NullMonster)
-REGISTER_MONSTER(Null, NullMonster);
+REGISTER_MONSTER(Null, NEW(NullMonster));
REGISTRY_DEFINE_GET(Monsters, MON_Null)
return _("The Ammo Buff gives you infinite ammo until the buff expires, so you don't need to worry about running out of ammo");
}
ENDCLASS(AmmoBuff)
-REGISTER_BUFF(AMMO, AmmoBuff);
+REGISTER_BUFF(AMMO, NEW(AmmoBuff));
BUFF_SPAWNFUNCS(ammo, BUFF_AMMO)
BUFF_SPAWNFUNC_Q3COMPAT(item_ammoregen, BUFF_AMMO)
return _("The Resistance Buff greatly reduces your damage taken while the buff is active");
}
ENDCLASS(ResistanceBuff)
-REGISTER_BUFF(RESISTANCE, ResistanceBuff);
+REGISTER_BUFF(RESISTANCE, NEW(ResistanceBuff));
BUFF_SPAWNFUNCS(resistance, BUFF_RESISTANCE)
BUFF_SPAWNFUNC_Q3COMPAT(item_guard, BUFF_RESISTANCE)
"It also gives you a chance to survive a fatal hit, with a small amount of health left over");
}
ENDCLASS(MedicBuff)
-REGISTER_BUFF(MEDIC, MedicBuff);
+REGISTER_BUFF(MEDIC, NEW(MedicBuff));
BUFF_SPAWNFUNCS(medic, BUFF_MEDIC)
BUFF_SPAWNFUNC_Q3COMPAT(item_regen, BUFF_MEDIC)
BUFF_SPAWNFUNC_Q3COMPAT(item_revival, BUFF_MEDIC)
"It also slightly increases knockback you deal to yourself");
}
ENDCLASS(BashBuff)
-REGISTER_BUFF(BASH, BashBuff);
+REGISTER_BUFF(BASH, NEW(BashBuff));
BUFF_SPAWNFUNCS(bash, BUFF_BASH)
BUFF_SPAWNFUNC_Q3COMPAT(item_scout, BUFF_BASH)
return _("The Vampire Buff converts some of the damage you deal to enemies and monsters into health for yourself, until the buff expires");
}
ENDCLASS(VampireBuff)
-REGISTER_BUFF(VAMPIRE, VampireBuff);
+REGISTER_BUFF(VAMPIRE, NEW(VampireBuff));
BUFF_SPAWNFUNCS(vampire, BUFF_VAMPIRE)
BUFF_SPAWNFUNC_Q3COMPAT(holdable_invulnerability, BUFF_VAMPIRE)
"This is particularly useful against speedy players, especially in Capture The Flag");
}
ENDCLASS(DisabilityBuff)
-REGISTER_BUFF(DISABILITY, DisabilityBuff);
+REGISTER_BUFF(DISABILITY, NEW(DisabilityBuff));
BUFF_SPAWNFUNCS(disability, BUFF_DISABILITY)
CLASS(VengeanceBuff, Buff)
return _("The Vengeance Buff reciprocates a portion of the damage enemies deal to you onto them, until the buff expires");
}
ENDCLASS(VengeanceBuff)
-REGISTER_BUFF(VENGEANCE, VengeanceBuff);
+REGISTER_BUFF(VENGEANCE, NEW(VengeanceBuff));
BUFF_SPAWNFUNCS(vengeance, BUFF_VENGEANCE)
BUFF_SPAWNFUNC_Q3COMPAT(holdable_kamikaze, BUFF_VENGEANCE)
return _("The Jump Buff greatly increases your jump height, while the buff is active");
}
ENDCLASS(JumpBuff)
-REGISTER_BUFF(JUMP, JumpBuff);
+REGISTER_BUFF(JUMP, NEW(JumpBuff));
BUFF_SPAWNFUNCS(jump, BUFF_JUMP)
BUFF_SPAWNFUNC_Q3COMPAT(item_jumper, BUFF_JUMP)
return _("The Inferno Buff sets any enemies or monsters you attack alight, dealing burn damage to them for several seconds until the buff expires");
}
ENDCLASS(InfernoBuff)
-REGISTER_BUFF(INFERNO, InfernoBuff);
+REGISTER_BUFF(INFERNO, NEW(InfernoBuff));
BUFF_SPAWNFUNCS(inferno, BUFF_INFERNO)
BUFF_SPAWNFUNC_Q3COMPAT(item_doubler, BUFF_INFERNO)
"A common usage of this Buff is to jump over the map's void, then swap with an enemy, to cause them to fall into the void");
}
ENDCLASS(SwapperBuff)
-REGISTER_BUFF(SWAPPER, SwapperBuff);
+REGISTER_BUFF(SWAPPER, NEW(SwapperBuff));
BUFF_SPAWNFUNCS(swapper, BUFF_SWAPPER)
BUFF_SPAWNFUNC_Q3COMPAT(holdable_teleporter, BUFF_SWAPPER)
return _("The Magnet Buff greatly increases your item pickup range, collecting nearby items for you while the buff is active");
}
ENDCLASS(MagnetBuff)
-REGISTER_BUFF(MAGNET, MagnetBuff);
+REGISTER_BUFF(MAGNET, NEW(MagnetBuff));
BUFF_SPAWNFUNCS(magnet, BUFF_MAGNET)
CLASS(LuckBuff, Buff)
return _("While you have the Luck Buff, each attack has a chance of being a critical hit with greatly increased damage");
}
ENDCLASS(LuckBuff)
-REGISTER_BUFF(LUCK, LuckBuff);
+REGISTER_BUFF(LUCK, NEW(LuckBuff));
BUFF_SPAWNFUNCS(luck, BUFF_LUCK)
CLASS(FlightBuff, Buff)
return _("While you have the Flight Buff, you can crouch while midair to switch your gravity, allowing flight");
}
ENDCLASS(FlightBuff)
-REGISTER_BUFF(FLIGHT, FlightBuff);
+REGISTER_BUFF(FLIGHT, NEW(FlightBuff));
BUFF_SPAWNFUNCS(flight, BUFF_FLIGHT)
BUFF_SPAWNFUNC_Q3COMPAT(item_flight, BUFF_FLIGHT)
#include <common/mutators/mutator/waypoints/all.qh>
#endif
-#define REGISTER_BUFF(id, class) REGISTER(StatusEffect, BUFF_##id, m_id, NEW(class))
+#define REGISTER_BUFF(id, inst) REGISTER(StatusEffect, BUFF_##id, m_id, inst)
#include <common/mutators/mutator/status_effects/_mod.qh>
CLASS(Buff, StatusEffects)
}
ENDCLASS(VaporizerCells)
-REGISTER_ITEM(VaporizerCells, VaporizerCells) {
+REGISTER_ITEM(VaporizerCells, NEW(VaporizerCells)) {
this.m_canonical_spawnfunc = "item_vaporizer_cells";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
}
ENDCLASS(ExtraLife)
-REGISTER_ITEM(ExtraLife, ExtraLife) {
+REGISTER_ITEM(ExtraLife, NEW(ExtraLife)) {
this.m_canonical_spawnfunc = "item_extralife";
#ifdef GAMEQC
this.m_model = MDL_ExtraLife_ITEM;
"Make sure you remember to throw it, or else it will blow up in your hands!");
}
ENDCLASS(NormalNade)
-REGISTER_NADE(NORMAL, NormalNade) {
+REGISTER_NADE(NORMAL, NEW(NormalNade)) {
this.m_color = '1 1 1';
#ifdef GAMEQC
NADE_PROJECTILE(0, PROJECTILE_NADE, EFFECT_Null);
"The napalm fire balls burn for a while, and damage players who get too close");
}
ENDCLASS(NapalmNade)
-REGISTER_NADE(NAPALM, NapalmNade) {
+REGISTER_NADE(NAPALM, NEW(NapalmNade)) {
this.m_color = '2 0.5 0';
this.m_name = _("Napalm grenade");
this.m_icon = "nade_napalm";
"While frozen, enemies are progressively dealt damage");
}
ENDCLASS(IceNade)
-REGISTER_NADE(ICE, IceNade) {
+REGISTER_NADE(ICE, NEW(IceNade)) {
this.m_color = '0 0.5 2';
this.m_name = _("Ice grenade");
this.m_icon = "nade_ice";
return _("The Translocate grenade detonates after a short delay, teleporting you to where it detonated");
}
ENDCLASS(TranslocateNade)
-REGISTER_NADE(TRANSLOCATE, TranslocateNade) {
+REGISTER_NADE(TRANSLOCATE, NEW(TranslocateNade)) {
this.m_color = '1 0 1';
this.m_name = _("Translocate grenade");
this.m_icon = "nade_translocate";
"It is useful for cases where you want to go back to some point on the map after you die");
}
ENDCLASS(SpawnNade)
-REGISTER_NADE(SPAWN, SpawnNade) {
+REGISTER_NADE(SPAWN, NEW(SpawnNade)) {
this.m_color = '1 0.9 0';
this.m_name = _("Spawn grenade");
this.m_icon = "nade_spawn";
"If your team members enter the orb they will recover health, and if enemies enter the sphere they will be harmed");
}
ENDCLASS(HealNade)
-REGISTER_NADE(HEAL, HealNade) {
+REGISTER_NADE(HEAL, NEW(HealNade)) {
this.m_color = '1 0 0';
this.m_name = _("Heal grenade");
this.m_icon = "nade_heal";
return _("The Monster grenade explodes after a short delay, spawning one of four monster types");
}
ENDCLASS(MonsterNade)
-REGISTER_NADE(MONSTER, MonsterNade) {
+REGISTER_NADE(MONSTER, NEW(MonsterNade)) {
this.m_color = '0.25 0.75 0';
this.m_name = _("Monster grenade");
this.m_icon = "nade_monster";
"Players and projectiles that enter the sphere will be slowed down, including yourself");
}
ENDCLASS(EntrapNade)
-REGISTER_NADE(ENTRAP, EntrapNade) {
+REGISTER_NADE(ENTRAP, NEW(EntrapNade)) {
this.m_color = '0.15 0.85 0';
this.m_name = _("Entrap grenade");
this.m_icon = "nade_entrap";
"Players inside the orb will be invisible to those outside it");
}
ENDCLASS(VeilNade)
-REGISTER_NADE(VEIL, VeilNade) {
+REGISTER_NADE(VEIL, NEW(VeilNade)) {
this.m_color = '0.65 0.85 0.65';
this.m_name = _("Veil grenade");
this.m_icon = "nade_veil";
"This does not impact weapon magazines, so it won't reload your weapons for you");
}
ENDCLASS(AmmoNade)
-REGISTER_NADE(AMMO, AmmoNade) {
+REGISTER_NADE(AMMO, NEW(AmmoNade)) {
this.m_color = '0.66 0.33 0';
this.m_name = _("Ammo grenade");
this.m_icon = "nade_ammo";
return _("The Darkness grenade detonates after a short delay, creating a dark field which temporarily blinds enemies who enter it");
}
ENDCLASS(DarknessNade)
-REGISTER_NADE(DARKNESS, DarknessNade) {
+REGISTER_NADE(DARKNESS, NEW(DarknessNade)) {
this.m_color = '0.23 0 0.23';
this.m_name = _("Darkness grenade");
this.m_icon = "nade_darkness";
REGISTER_REGISTRY(Nades)
REGISTRY_CHECK(Nades)
-#define REGISTER_NADE(id, class) REGISTER(Nades, NADE_TYPE, id, m_id, NEW(class))
+#define REGISTER_NADE(id, inst) REGISTER(Nades, NADE_TYPE, id, m_id, inst)
CLASS(Nade, Object)
ATTRIB(Nade, m_id, int, 0);
item.invisibility_finished = (item.count) ? item.count : autocvar_g_balance_powerup_invisibility_time;
}
#endif
-REGISTER_ITEM(Invisibility, Powerup) {
+REGISTER_ITEM(Invisibility, NEW(Powerup)) {
this.m_canonical_spawnfunc = "item_invisibility";
#ifdef SVQC
this.m_iteminit = powerup_invisibility_init;
item.invincible_finished = (item.count) ? item.count : autocvar_g_balance_powerup_invincible_time;
}
#endif
-REGISTER_ITEM(Shield, Powerup) {
+REGISTER_ITEM(Shield, NEW(Powerup)) {
this.m_canonical_spawnfunc = "item_shield";
#ifdef SVQC
this.m_iteminit = powerup_shield_init;
item.speed_finished = (item.count) ? item.count : autocvar_g_balance_powerup_speed_time;
}
#endif
-REGISTER_ITEM(Speed, Powerup) {
+REGISTER_ITEM(Speed, NEW(Powerup)) {
this.m_canonical_spawnfunc = "item_speed";
#ifdef SVQC
this.m_iteminit = powerup_speed_init;
item.strength_finished = (item.count) ? item.count : autocvar_g_balance_powerup_strength_time;
}
#endif
-REGISTER_ITEM(Strength, Powerup) {
+REGISTER_ITEM(Strength, NEW(Powerup)) {
this.m_canonical_spawnfunc = "item_strength";
#ifdef SVQC
this.m_iteminit = powerup_strength_init;