diff --git a/src/g_shared/a_artifacts.cpp b/src/g_shared/a_artifacts.cpp index fa2c1e59f6..1fe00931d0 100644 --- a/src/g_shared/a_artifacts.cpp +++ b/src/g_shared/a_artifacts.cpp @@ -537,7 +537,6 @@ PalEntry APowerStrength::GetBlend () // Invisibility Powerup ------------------------------------------------------ IMPLEMENT_CLASS (APowerInvisibility) -IMPLEMENT_CLASS (APowerShadow) // Invisibility flag combos #define INVISIBILITY_FLAGS1 (MF_SHADOW) diff --git a/src/g_shared/a_artifacts.h b/src/g_shared/a_artifacts.h index 93352a719c..00e39247eb 100644 --- a/src/g_shared/a_artifacts.h +++ b/src/g_shared/a_artifacts.h @@ -81,12 +81,6 @@ protected: // fixed_t OwnersNormalAlpha; }; -// Needed only for m_cheat.cpp now -class APowerShadow : public APowerInvisibility -{ - DECLARE_CLASS (APowerShadow, APowerInvisibility) -}; - class APowerIronFeet : public APowerup { DECLARE_CLASS (APowerIronFeet, APowerup) diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index 2b87900b0a..270ecf4215 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -52,17 +52,17 @@ void cht_DoCheat (player_t *player, int cheat) { - static const PClass * const BeholdPowers[9] = + static const char * BeholdPowers[9] = { - RUNTIME_CLASS(APowerInvulnerable), - RUNTIME_CLASS(APowerStrength), - RUNTIME_CLASS(APowerInvisibility), - RUNTIME_CLASS(APowerIronFeet), - NULL, // MapRevealer - RUNTIME_CLASS(APowerLightAmp), - RUNTIME_CLASS(APowerShadow), - RUNTIME_CLASS(APowerMask), - RUNTIME_CLASS(APowerTargeter) + { "PowerInvulnerable" }, + { "PowerStrength" }, + { "PowerInvisibility" }, + { "PowerIronFeet" }, + { "MapRevealer" }, + { "PowerLightAmp" }, + { "PowerShadow" }, + { "PowerMask" }, + { "PowerTargeter" }, }; const PClass *type; AInventory *item; @@ -253,7 +253,7 @@ void cht_DoCheat (player_t *player, int cheat) { if (i != 0) { - player->mo->GiveInventoryType (BeholdPowers[i]); + cht_Give(player, BeholdPowers[i]); if (cheat == CHT_BEHOLDS) { P_GiveBody (player->mo, -100); @@ -262,7 +262,7 @@ void cht_DoCheat (player_t *player, int cheat) else { // Let's give the item here so that the power doesn't need colormap information. - player->mo->GiveInventoryType(PClass::FindClass("InvulnerabilitySphere")); + cht_Give(player, "InvulnerabilitySphere"); } } else diff --git a/wadsrc/static/actors/shared/inventory.txt b/wadsrc/static/actors/shared/inventory.txt index 659bab6328..3e805ed05e 100644 --- a/wadsrc/static/actors/shared/inventory.txt +++ b/wadsrc/static/actors/shared/inventory.txt @@ -184,7 +184,7 @@ ACTOR PowerGhost : PowerInvisibility Powerup.Mode "None" } -ACTOR PowerShadow : PowerInvisibility native +ACTOR PowerShadow : PowerInvisibility { +INVENTORY.HUBPOWER Powerup.Duration -55