- added a Buddha powerup

This commit is contained in:
Christoph Oelckers 2014-10-25 09:53:23 +02:00
parent a19620968d
commit 313245dd77
3 changed files with 49 additions and 0 deletions

View file

@ -1396,6 +1396,42 @@ void APowerFrightener::EndEffect ()
Owner->player->cheats &= ~CF_FRIGHTENING;
}
// Buddha Powerup --------------------------------
IMPLEMENT_CLASS (APowerBuddha)
//===========================================================================
//
// APowerBuddha :: InitEffect
//
//===========================================================================
void APowerBuddha::InitEffect ()
{
Super::InitEffect();
if (Owner== NULL || Owner->player == NULL)
return;
Owner->player->cheats |= CF_FRIGHTENING;
}
//===========================================================================
//
// APowerBuddha :: EndEffect
//
//===========================================================================
void APowerBuddha::EndEffect ()
{
Super::EndEffect();
if (Owner== NULL || Owner->player == NULL)
return;
Owner->player->cheats &= ~CF_FRIGHTENING;
}
// Scanner powerup ----------------------------------------------------------
IMPLEMENT_CLASS (APowerScanner)

View file

@ -184,6 +184,14 @@ protected:
void EndEffect ();
};
class APowerBuddha : public APowerup
{
DECLARE_CLASS (APowerBuddha, APowerup)
protected:
void InitEffect ();
void EndEffect ();
};
class APowerTimeFreezer : public APowerup
{
DECLARE_CLASS( APowerTimeFreezer, APowerup )

View file

@ -271,6 +271,11 @@ ACTOR PowerFrightener : Powerup native
Powerup.Duration -60
}
ACTOR PowerBuddha : Powerup native
{
Powerup.Duration -60
}
ACTOR PowerScanner : Powerup native
{
Powerup.Duration -80