May 3, 2006 (Changes by Graf Zahl)
- Removed doom.x, heretic.x and strife.x from the SVN repository. These are generated files. - Fixed: A_PainDie has to check whether a valid target exists before calling IsFriend. - Fixed: FDecalLib::FindAnimator needs a signed counter to work properly. May 1, 2006 (Changes by Graf Zahl) - Added support for game specific pickup messages, if only to be able to define Raven's invulnerability item in DECORATE. - Removed A_TreeDeath because it is no longer used. - Fixed: When picking up a PowerupGiver for an active powerup the blend color and the duration were transferred to a temorary item and never took effect. They have to be trnasferred to the newly created powerup item before trying to give it to the player, not afterward. - Made the colormap of the InvulnerabilitySphere item specific. The base power class still needs to have its color adjusted per game though and since Raven's invulnerability item is used in both Hexen and Heretic it can't define its own colormap/blend. - Separated the invulnerability colormaps from the game being played and made them item specific. They can also be specified as regular blend colors in DECORATE now. - Converted a_hereticarmor.cpp and most of a_doomartifacts.cpp, a_hereticartifacts.cpp and a_heretickeys.cpp to DECORATE. - Changed the Soulsphere to be a real health item with the Dehacked modifications made in d_dehacked.cpp as for most other items which need to be adjusted. - Added IF_BIGPOWERUP flag to AInventory to expose the RESPAWN_SUPER dmflag to DECORATE. Also removed the now obsolete ShouldRespawn methods from AInvulnerabilitySphere and ABlurSphere. - Converted a_splashes.cpp to DECORATE. - Converted most of a_debris.cpp to DECORATE. SVN r73 (trunk)
This commit is contained in:
parent
01a41a6f13
commit
0e69196370
59 changed files with 1429 additions and 1532 deletions
|
|
@ -44,17 +44,18 @@ bool APowerupGiver::Use (bool pickup)
|
|||
{
|
||||
APowerup *power = static_cast<APowerup *> (Spawn (PowerupType, 0, 0, 0));
|
||||
|
||||
if (EffectTics != 0)
|
||||
{
|
||||
power->EffectTics = EffectTics;
|
||||
}
|
||||
if (BlendColor != 0)
|
||||
{
|
||||
power->BlendColor = BlendColor;
|
||||
}
|
||||
|
||||
power->ItemFlags |= ItemFlags & IF_ALWAYSPICKUP;
|
||||
if (power->TryPickup (Owner))
|
||||
{
|
||||
if (EffectTics != 0)
|
||||
{
|
||||
power->EffectTics = EffectTics;
|
||||
}
|
||||
if (BlendColor != 0)
|
||||
{
|
||||
power->BlendColor = BlendColor;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
power->GoAwayAndDie ();
|
||||
|
|
@ -91,6 +92,14 @@ void APowerup::Tick ()
|
|||
else if (EffectTics > 0)
|
||||
{
|
||||
DoEffect ();
|
||||
|
||||
if (EffectTics > BLINKTHRESHOLD || (EffectTics & 8))
|
||||
{
|
||||
if (BlendColor == INVERSECOLOR) Owner->player->fixedcolormap = INVERSECOLORMAP;
|
||||
else if (BlendColor == GOLDCOLOR) Owner->player->fixedcolormap = GOLDCOLORMAP;
|
||||
}
|
||||
else Owner->player->fixedcolormap = 0;
|
||||
|
||||
if (--EffectTics == 0)
|
||||
{
|
||||
Destroy ();
|
||||
|
|
@ -118,7 +127,10 @@ void APowerup::Serialize (FArchive &arc)
|
|||
|
||||
PalEntry APowerup::GetBlend ()
|
||||
{
|
||||
if (EffectTics <= 4*32 && !(EffectTics & 8))
|
||||
if (EffectTics <= BLINKTHRESHOLD && !(EffectTics & 8))
|
||||
return 0;
|
||||
|
||||
if (BlendColor == INVERSECOLOR || BlendColor == GOLDCOLOR)
|
||||
return 0;
|
||||
|
||||
return BlendColor;
|
||||
|
|
@ -213,7 +225,12 @@ bool APowerup::HandlePickup (AInventory *item)
|
|||
return true;
|
||||
}
|
||||
// Only increase the EffectTics, not decrease it.
|
||||
EffectTics = MAX (EffectTics, power->EffectTics);
|
||||
// Color also gets transferred only when the new item has an effect.
|
||||
if (power->EffectTics > EffectTics)
|
||||
{
|
||||
EffectTics = power->EffectTics;
|
||||
BlendColor = power->BlendColor;
|
||||
}
|
||||
power->ItemFlags |= IF_PICKUPGOOD;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -259,6 +276,25 @@ IMPLEMENT_STATELESS_ACTOR (APowerInvulnerable, Any, -1, 0)
|
|||
PROP_Inventory_Icon ("SPSHLD0")
|
||||
END_DEFAULTS
|
||||
|
||||
// Need to set the default for each game here
|
||||
AT_GAME_SET(PowerInvulnerable)
|
||||
{
|
||||
APowerInvulnerable * invul = GetDefault<APowerInvulnerable>();
|
||||
switch (gameinfo.gametype)
|
||||
{
|
||||
case GAME_Doom:
|
||||
case GAME_Strife:
|
||||
invul->BlendColor = INVERSECOLOR;
|
||||
break;
|
||||
|
||||
case GAME_Heretic:
|
||||
invul->BlendColor = GOLDCOLOR;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
//===========================================================================
|
||||
//
|
||||
// APowerInvulnerable :: InitEffect
|
||||
|
|
@ -281,19 +317,6 @@ void APowerInvulnerable::InitEffect ()
|
|||
void APowerInvulnerable::DoEffect ()
|
||||
{
|
||||
Owner->player->mo->SpecialInvulnerabilityHandling (APlayerPawn::INVUL_Active);
|
||||
if (gameinfo.gametype != GAME_Hexen)
|
||||
{
|
||||
if ((EffectTics > BLINKTHRESHOLD || (EffectTics & 8)) &&
|
||||
!(Owner->player->mo->effects & FX_RESPAWNINVUL) &&
|
||||
0 == BlendColor.a) // [RH] No special colormap if there is a blend
|
||||
{
|
||||
Owner->player->fixedcolormap = NUMCOLORMAPS;
|
||||
}
|
||||
else
|
||||
{
|
||||
Owner->player->fixedcolormap = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue