- fixed: IDBEHOLD altered the item counter.

SVN r2247 (trunk)
This commit is contained in:
Christoph Oelckers 2010-03-26 22:26:50 +00:00
parent 0529ffa043
commit 7f2ab00abe
4 changed files with 13 additions and 20 deletions

View file

@ -537,7 +537,6 @@ PalEntry APowerStrength::GetBlend ()
// Invisibility Powerup ------------------------------------------------------ // Invisibility Powerup ------------------------------------------------------
IMPLEMENT_CLASS (APowerInvisibility) IMPLEMENT_CLASS (APowerInvisibility)
IMPLEMENT_CLASS (APowerShadow)
// Invisibility flag combos // Invisibility flag combos
#define INVISIBILITY_FLAGS1 (MF_SHADOW) #define INVISIBILITY_FLAGS1 (MF_SHADOW)

View file

@ -81,12 +81,6 @@ protected:
// fixed_t OwnersNormalAlpha; // fixed_t OwnersNormalAlpha;
}; };
// Needed only for m_cheat.cpp now
class APowerShadow : public APowerInvisibility
{
DECLARE_CLASS (APowerShadow, APowerInvisibility)
};
class APowerIronFeet : public APowerup class APowerIronFeet : public APowerup
{ {
DECLARE_CLASS (APowerIronFeet, APowerup) DECLARE_CLASS (APowerIronFeet, APowerup)

View file

@ -52,17 +52,17 @@
void cht_DoCheat (player_t *player, int cheat) void cht_DoCheat (player_t *player, int cheat)
{ {
static const PClass * const BeholdPowers[9] = static const char * BeholdPowers[9] =
{ {
RUNTIME_CLASS(APowerInvulnerable), { "PowerInvulnerable" },
RUNTIME_CLASS(APowerStrength), { "PowerStrength" },
RUNTIME_CLASS(APowerInvisibility), { "PowerInvisibility" },
RUNTIME_CLASS(APowerIronFeet), { "PowerIronFeet" },
NULL, // MapRevealer { "MapRevealer" },
RUNTIME_CLASS(APowerLightAmp), { "PowerLightAmp" },
RUNTIME_CLASS(APowerShadow), { "PowerShadow" },
RUNTIME_CLASS(APowerMask), { "PowerMask" },
RUNTIME_CLASS(APowerTargeter) { "PowerTargeter" },
}; };
const PClass *type; const PClass *type;
AInventory *item; AInventory *item;
@ -253,7 +253,7 @@ void cht_DoCheat (player_t *player, int cheat)
{ {
if (i != 0) if (i != 0)
{ {
player->mo->GiveInventoryType (BeholdPowers[i]); cht_Give(player, BeholdPowers[i]);
if (cheat == CHT_BEHOLDS) if (cheat == CHT_BEHOLDS)
{ {
P_GiveBody (player->mo, -100); P_GiveBody (player->mo, -100);
@ -262,7 +262,7 @@ void cht_DoCheat (player_t *player, int cheat)
else else
{ {
// Let's give the item here so that the power doesn't need colormap information. // 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 else

View file

@ -184,7 +184,7 @@ ACTOR PowerGhost : PowerInvisibility
Powerup.Mode "None" Powerup.Mode "None"
} }
ACTOR PowerShadow : PowerInvisibility native ACTOR PowerShadow : PowerInvisibility
{ {
+INVENTORY.HUBPOWER +INVENTORY.HUBPOWER
Powerup.Duration -55 Powerup.Duration -55