From: otta8634 Date: Thu, 19 Dec 2024 09:34:53 +0000 (+0800) Subject: Revert to using inst rather than class in REGISTER_* macros X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=41127f9f4f83772c0a0e508ced95c310af01856e;p=xonotic%2Fxonotic-data.pk3dir.git Revert to using inst rather than class in REGISTER_* macros Not sure why I even changed to the latter for REGISTER_ITEM, REGISTER_NADE, and REGISTER_BUFF. --- diff --git a/qcsrc/common/items/all.qh b/qcsrc/common/items/all.qh index 3d3d62e46..e956d2972 100644 --- a/qcsrc/common/items/all.qh +++ b/qcsrc/common/items/all.qh @@ -10,7 +10,7 @@ REGISTRY(Items, 32) 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 diff --git a/qcsrc/common/items/item/ammo.qh b/qcsrc/common/items/item/ammo.qh index 5b2b8fdf4..9551fadaa 100644 --- a/qcsrc/common/items/item/ammo.qh +++ b/qcsrc/common/items/item/ammo.qh @@ -56,7 +56,7 @@ CLASS(Shells, Ammo) } 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; @@ -97,7 +97,7 @@ CLASS(Bullets, Ammo) } 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; @@ -138,7 +138,7 @@ CLASS(Rockets, Ammo) } 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; @@ -179,7 +179,7 @@ CLASS(Cells, Ammo) } 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; diff --git a/qcsrc/common/items/item/armor.qh b/qcsrc/common/items/item/armor.qh index c45079f10..2944cd3c9 100644 --- a/qcsrc/common/items/item/armor.qh +++ b/qcsrc/common/items/item/armor.qh @@ -39,7 +39,7 @@ CLASS(ArmorSmall, Armor) } 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; @@ -93,7 +93,7 @@ CLASS(ArmorMedium, Armor) } 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; @@ -147,7 +147,7 @@ CLASS(ArmorBig, Armor) } 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; @@ -202,7 +202,7 @@ CLASS(ArmorMega, Armor) } 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; diff --git a/qcsrc/common/items/item/health.qh b/qcsrc/common/items/item/health.qh index 5a85beb97..265717a66 100644 --- a/qcsrc/common/items/item/health.qh +++ b/qcsrc/common/items/item/health.qh @@ -39,7 +39,7 @@ CLASS(HealthSmall, Health) } 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; @@ -93,7 +93,7 @@ CLASS(HealthMedium, Health) } 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; @@ -147,7 +147,7 @@ CLASS(HealthBig, Health) } 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; @@ -201,7 +201,7 @@ CLASS(HealthMega, Health) } 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; diff --git a/qcsrc/common/items/item/jetpack.qh b/qcsrc/common/items/item/jetpack.qh index 1f6ad365b..9e58297f6 100644 --- a/qcsrc/common/items/item/jetpack.qh +++ b/qcsrc/common/items/item/jetpack.qh @@ -39,7 +39,7 @@ CLASS(Jetpack, Powerup) } ENDCLASS(Jetpack) -REGISTER_ITEM(Jetpack, Jetpack) { +REGISTER_ITEM(Jetpack, NEW(Jetpack)) { this.m_canonical_spawnfunc = "item_jetpack"; #ifdef GAMEQC this.spawnflags = ITEM_FLAG_NORMAL; @@ -82,7 +82,7 @@ void ammo_fuel_init(Pickup this, entity item) 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; @@ -124,7 +124,7 @@ CLASS(JetpackRegen, Powerup) } 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; diff --git a/qcsrc/common/monsters/all.qh b/qcsrc/common/monsters/all.qh index eaae9e832..ae3924c0d 100644 --- a/qcsrc/common/monsters/all.qh +++ b/qcsrc/common/monsters/all.qh @@ -13,5 +13,5 @@ REGISTRY_CHECK(Monsters) 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) diff --git a/qcsrc/common/mutators/mutator/buffs/all.inc b/qcsrc/common/mutators/mutator/buffs/all.inc index 7ec8cfc22..90995e462 100644 --- a/qcsrc/common/mutators/mutator/buffs/all.inc +++ b/qcsrc/common/mutators/mutator/buffs/all.inc @@ -27,7 +27,7 @@ CLASS(AmmoBuff, Buff) 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) @@ -43,7 +43,7 @@ CLASS(ResistanceBuff, Buff) 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) @@ -60,7 +60,7 @@ CLASS(MedicBuff, Buff) "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) @@ -78,7 +78,7 @@ CLASS(BashBuff, Buff) "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) @@ -94,7 +94,7 @@ CLASS(VampireBuff, Buff) 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) @@ -111,7 +111,7 @@ CLASS(DisabilityBuff, Buff) "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) @@ -126,7 +126,7 @@ 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) @@ -142,7 +142,7 @@ CLASS(JumpBuff, Buff) 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) @@ -158,7 +158,7 @@ CLASS(InfernoBuff, Buff) 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) @@ -175,7 +175,7 @@ CLASS(SwapperBuff, Buff) "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) @@ -191,7 +191,7 @@ CLASS(MagnetBuff, Buff) 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) @@ -206,7 +206,7 @@ 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) @@ -221,6 +221,6 @@ 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) diff --git a/qcsrc/common/mutators/mutator/buffs/buffs.qh b/qcsrc/common/mutators/mutator/buffs/buffs.qh index ca58b15d4..fafd81bd5 100644 --- a/qcsrc/common/mutators/mutator/buffs/buffs.qh +++ b/qcsrc/common/mutators/mutator/buffs/buffs.qh @@ -8,7 +8,7 @@ #include #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 CLASS(Buff, StatusEffects) diff --git a/qcsrc/common/mutators/mutator/instagib/items.qh b/qcsrc/common/mutators/mutator/instagib/items.qh index 1ac8d1b30..bf4d0023d 100644 --- a/qcsrc/common/mutators/mutator/instagib/items.qh +++ b/qcsrc/common/mutators/mutator/instagib/items.qh @@ -31,7 +31,7 @@ CLASS(VaporizerCells, Ammo) } 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; @@ -67,7 +67,7 @@ CLASS(ExtraLife, Powerup) } 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; diff --git a/qcsrc/common/mutators/mutator/nades/nades.inc b/qcsrc/common/mutators/mutator/nades/nades.inc index e2564fc52..0df8fe5f6 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.inc +++ b/qcsrc/common/mutators/mutator/nades/nades.inc @@ -13,7 +13,7 @@ CLASS(NormalNade, Nade) "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); @@ -29,7 +29,7 @@ CLASS(NapalmNade, Nade) "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"; @@ -47,7 +47,7 @@ CLASS(IceNade, Nade) "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"; @@ -64,7 +64,7 @@ CLASS(TranslocateNade, Nade) 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"; @@ -82,7 +82,7 @@ CLASS(SpawnNade, Nade) "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"; @@ -100,7 +100,7 @@ CLASS(HealNade, Nade) "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"; @@ -117,7 +117,7 @@ CLASS(MonsterNade, Nade) 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"; @@ -135,7 +135,7 @@ CLASS(EntrapNade, Nade) "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"; @@ -153,7 +153,7 @@ CLASS(VeilNade, Nade) "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"; @@ -173,7 +173,7 @@ CLASS(AmmoNade, Nade) "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"; @@ -190,7 +190,7 @@ CLASS(DarknessNade, Nade) 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"; diff --git a/qcsrc/common/mutators/mutator/nades/nades.qh b/qcsrc/common/mutators/mutator/nades/nades.qh index c511b9159..2c39aca7e 100644 --- a/qcsrc/common/mutators/mutator/nades/nades.qh +++ b/qcsrc/common/mutators/mutator/nades/nades.qh @@ -115,7 +115,7 @@ REGISTRY(Nades, BITS(4)) 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); diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh b/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh index dabf7f48c..0bfcc9426 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh @@ -28,7 +28,7 @@ void powerup_invisibility_init(Pickup def, entity item) 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; diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/shield.qh b/qcsrc/common/mutators/mutator/powerups/powerup/shield.qh index 4e184eb1e..952e983c3 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/shield.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerup/shield.qh @@ -27,7 +27,7 @@ void powerup_shield_init(Pickup def, entity item) 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; diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh b/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh index 633c7b1bf..8b782f75e 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerup/speed.qh @@ -29,7 +29,7 @@ void powerup_speed_init(Pickup def, entity item) 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; diff --git a/qcsrc/common/mutators/mutator/powerups/powerup/strength.qh b/qcsrc/common/mutators/mutator/powerups/powerup/strength.qh index a3af05f5e..162451222 100644 --- a/qcsrc/common/mutators/mutator/powerups/powerup/strength.qh +++ b/qcsrc/common/mutators/mutator/powerups/powerup/strength.qh @@ -29,7 +29,7 @@ void powerup_strength_init(Pickup def, entity item) 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;