]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert to using inst rather than class in REGISTER_* macros
authorotta8634 <k9wolf@pm.me>
Thu, 19 Dec 2024 09:34:53 +0000 (17:34 +0800)
committerotta8634 <k9wolf@pm.me>
Thu, 19 Dec 2024 09:34:53 +0000 (17:34 +0800)
Not sure why I even changed to the latter for REGISTER_ITEM, REGISTER_NADE,
and REGISTER_BUFF.

15 files changed:
qcsrc/common/items/all.qh
qcsrc/common/items/item/ammo.qh
qcsrc/common/items/item/armor.qh
qcsrc/common/items/item/health.qh
qcsrc/common/items/item/jetpack.qh
qcsrc/common/monsters/all.qh
qcsrc/common/mutators/mutator/buffs/all.inc
qcsrc/common/mutators/mutator/buffs/buffs.qh
qcsrc/common/mutators/mutator/instagib/items.qh
qcsrc/common/mutators/mutator/nades/nades.inc
qcsrc/common/mutators/mutator/nades/nades.qh
qcsrc/common/mutators/mutator/powerups/powerup/invisibility.qh
qcsrc/common/mutators/mutator/powerups/powerup/shield.qh
qcsrc/common/mutators/mutator/powerups/powerup/speed.qh
qcsrc/common/mutators/mutator/powerups/powerup/strength.qh

index 3d3d62e4631c40e0b4516b25fe9de71e95c84427..e956d297295e7f7407f3cf223cb70216db16596d 100644 (file)
@@ -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
index 5b2b8fdf43d18ec446dea6453db96231979f6410..9551fadaacfb03b8c4e272a69048f0ba8dce2aa7 100644 (file)
@@ -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;
index c45079f10683d78683e8a6f9a1d99a4dccbc90c7..2944cd3c9c83a41a36d7d33d588a01793d95453a 100644 (file)
@@ -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;
index 5a85beb97e376f0f16836ac846897c3a23b8d13d..265717a667357edd28b97ab5b30534fb75543df4 100644 (file)
@@ -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;
index 1f6ad365bbfd00cd907393066a316e4a5c6c4a89..9e58297f64ba1c574782e69b025b82a4438ca24b 100644 (file)
@@ -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;
index eaae9e832b3dce3c31f813432a1c54287119e4bd..ae3924c0d4677c470cce547ba9a03e38e26ba524 100644 (file)
@@ -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)
index 7ec8cfc228d00aee1ff7de541330558820ff050f..90995e462f65589b4f1bc5c667b97e0234d15336 100644 (file)
@@ -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)
index ca58b15d4dd84bd9c23105f10a113d108e934bb3..fafd81bd5d6bb13dec7ba0a4b51dc72d6e05bb43 100644 (file)
@@ -8,7 +8,7 @@
 #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)
index 1ac8d1b3019528e6540e0d3e15d01f87cb25f8bf..bf4d0023dc6f2b02150bb8cfcb86a9baaf00520f 100644 (file)
@@ -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;
index e2564fc52d82f91fdf4fcb2569699f29de8f2105..0df8fe5f6226738ce3b4016028175023848ea0d7 100644 (file)
@@ -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";
index c511b9159f17633f0f764b4caeee969d6afe86dd..2c39aca7e9d0bd9b743bee23d90ecd45d4d3ae8f 100644 (file)
@@ -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);
index dabf7f48c4b1e1bd7f4d84f0f9b3b403016acc42..0bfcc9426b4781200d58f785f05a1cedfc010f37 100644 (file)
@@ -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;
index 4e184eb1ecfbaba71e1ddaad38bb7ee3c91a4ac6..952e983c3812be9d9a9b8d9a4bc7c78cd10b702c 100644 (file)
@@ -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;
index 633c7b1bfc50082ea39d0aeaf6fa216fc3ad8118..8b782f75e7d0c234906932a605ae81331c68866d 100644 (file)
@@ -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;
index a3af05f5eb4befc7f9e4cf5d0990e7df04684daf..162451222e222afccaa17dfb1d8dbd0bba3d6430 100644 (file)
@@ -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;