mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 01:02:03 +00:00
- Fixed: In Strife, using the shadow armor a second time while it is still
active should make you completely invisible and your first-person weapon inverse grayscale. SVN r499 (trunk)
This commit is contained in:
parent
72643bece6
commit
1a72c5f7b9
3 changed files with 50 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
March 8, 2007
|
||||
- Fixed: In Strife, using the shadow armor a second time while it is still
|
||||
active should make you completely invisible and your first-person weapon
|
||||
inverse grayscale.
|
||||
|
||||
March 7, 2007
|
||||
- Changed P_SpawnPlayerMissile() to use the same height calculation as
|
||||
P_(Aim)LineAttack().
|
||||
|
|
|
@ -456,7 +456,7 @@ void APowerInvulnerable::EndEffect ()
|
|||
|
||||
int APowerInvulnerable::AlterWeaponSprite (vissprite_t *vis)
|
||||
{
|
||||
int changed = Inventory == NULL? false : Inventory->AlterWeaponSprite(vis);
|
||||
int changed = Inventory == NULL ? false : Inventory->AlterWeaponSprite(vis);
|
||||
if (Owner != NULL)
|
||||
{
|
||||
if (mode == NAME_Ghost && !(Owner->flags & MF_SHADOW))
|
||||
|
@ -600,7 +600,7 @@ void APowerInvisibility::EndEffect ()
|
|||
|
||||
int APowerInvisibility::AlterWeaponSprite (vissprite_t *vis)
|
||||
{
|
||||
int changed = Inventory == NULL? false : Inventory->AlterWeaponSprite(vis);
|
||||
int changed = Inventory == NULL ? false : Inventory->AlterWeaponSprite(vis);
|
||||
|
||||
// Blink if the powerup is wearing off
|
||||
if (changed == 0 && EffectTics < 4*32 && !(EffectTics & 8))
|
||||
|
@ -645,7 +645,7 @@ void APowerGhost::InitEffect ()
|
|||
|
||||
int APowerGhost::AlterWeaponSprite (vissprite_t *vis)
|
||||
{
|
||||
int changed = Inventory == NULL? false : Inventory->AlterWeaponSprite(vis);
|
||||
int changed = Inventory == NULL ? false : Inventory->AlterWeaponSprite(vis);
|
||||
|
||||
// Blink if the powerup is wearing off
|
||||
if (changed == 0 && EffectTics < 4*32 && !(EffectTics & 8))
|
||||
|
@ -669,6 +669,40 @@ IMPLEMENT_STATELESS_ACTOR (APowerShadow, Any, -1, 0)
|
|||
PROP_Inventory_FlagsSet (IF_HUBPOWER)
|
||||
END_DEFAULTS
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// APowerShadow :: HandlePickup
|
||||
//
|
||||
// If the player already has the first stage of the powerup, getting it
|
||||
// again makes them completely invisible. Special1 tracks which stage we
|
||||
// are in, initially 0.
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
bool APowerShadow::HandlePickup (AInventory *item)
|
||||
{
|
||||
if (special1 == 0 && item->GetClass() == GetClass())
|
||||
{
|
||||
APowerup *power = static_cast<APowerup *>(item);
|
||||
if (power->EffectTics == 0)
|
||||
{
|
||||
power->ItemFlags |= IF_PICKUPGOOD;
|
||||
return true;
|
||||
}
|
||||
// Only increase the EffectTics, not decrease it.
|
||||
// Color also gets transferred only when the new item has an effect.
|
||||
if (power->EffectTics > EffectTics)
|
||||
{
|
||||
EffectTics = power->EffectTics;
|
||||
BlendColor = power->BlendColor;
|
||||
}
|
||||
special1 = 1; // Go to stage 2.
|
||||
power->ItemFlags |= IF_PICKUPGOOD;
|
||||
return true;
|
||||
}
|
||||
return Super::HandlePickup (item);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// APowerShadow :: InitEffect
|
||||
|
@ -678,7 +712,7 @@ END_DEFAULTS
|
|||
void APowerShadow::InitEffect ()
|
||||
{
|
||||
Owner->flags |= MF_SHADOW;
|
||||
Owner->alpha = TRANSLUC25;
|
||||
Owner->alpha = special1 == 0 ? TRANSLUC25 : 0;
|
||||
Owner->RenderStyle = STYLE_Translucent;
|
||||
}
|
||||
|
||||
|
@ -690,7 +724,7 @@ void APowerShadow::InitEffect ()
|
|||
|
||||
int APowerShadow::AlterWeaponSprite (vissprite_t *vis)
|
||||
{
|
||||
int changed = Inventory == NULL? false : Inventory->AlterWeaponSprite(vis);
|
||||
int changed = Inventory == NULL ? false : Inventory->AlterWeaponSprite(vis);
|
||||
|
||||
// Blink if the powerup is wearing off
|
||||
if (changed == 0 && EffectTics < 4*32 && !(EffectTics & 8))
|
||||
|
@ -704,6 +738,11 @@ int APowerShadow::AlterWeaponSprite (vissprite_t *vis)
|
|||
vis->alpha = TRANSLUC25;
|
||||
vis->RenderStyle = STYLE_Translucent;
|
||||
}
|
||||
if (special1 == 1)
|
||||
{
|
||||
vis->alpha = TRANSLUC25;
|
||||
vis->colormap = InverseColormap;
|
||||
}
|
||||
return -1; // This item is valid so another one shouldn't reset the translucency
|
||||
}
|
||||
|
||||
|
|
|
@ -105,6 +105,7 @@ class APowerShadow : public APowerInvisibility
|
|||
{
|
||||
DECLARE_STATELESS_ACTOR (APowerShadow, APowerInvisibility)
|
||||
protected:
|
||||
bool HandlePickup (AInventory *item);
|
||||
void InitEffect ();
|
||||
int AlterWeaponSprite (vissprite_t *vis);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue