- Added Skulltag's PowerDoubleFiringSpeed.

SVN r1608 (trunk)
This commit is contained in:
Randy Heit 2009-05-26 01:16:39 +00:00
parent 2f7498214b
commit 956b7d5ea3
5 changed files with 53 additions and 1 deletions

View file

@ -1,5 +1,5 @@
May 25, 2009
- Specifiying non-existant directories with -savedir or the save_dir cvar now
- Specifying non-existent directories with -savedir or the save_dir cvar now
attempts to create them.
- I_CheckNativeMouse() now checks the foreground window to determine if the
mouse should be grabbed. This fixes the case where you start the game in

View file

@ -1707,6 +1707,41 @@ void APowerHighJump::EndEffect( )
}
}
// Double firing speed rune ---------------------------------------------
IMPLEMENT_CLASS(APowerDoubleFiringSpeed)
//===========================================================================
//
// APowerDoubleFiringSpeed :: InitEffect
//
//===========================================================================
void APowerDoubleFiringSpeed::InitEffect( )
{
if (Owner== NULL || Owner->player == NULL)
return;
// Give the player the power to shoot twice as fast.
Owner->player->cheats |= CF_DOUBLEFIRINGSPEED;
}
//===========================================================================
//
// APowerDoubleFiringSpeed :: EndEffect
//
//===========================================================================
void APowerDoubleFiringSpeed::EndEffect( )
{
// Nothing to do if there's no owner.
if (Owner != NULL && Owner->player != NULL)
{
// Take away the shooting twice as fast power.
Owner->player->cheats &= ~CF_DOUBLEFIRINGSPEED;
}
}
// Morph powerup ------------------------------------------------------
IMPLEMENT_CLASS(APowerMorph)

View file

@ -245,6 +245,14 @@ protected:
void EndEffect( );
};
class APowerDoubleFiringSpeed : public APowerup
{
DECLARE_CLASS( APowerDoubleFiringSpeed, APowerup )
protected:
void InitEffect( );
void EndEffect( );
};
class APowerMorph : public APowerup
{
DECLARE_CLASS( APowerMorph, APowerup )

View file

@ -772,6 +772,11 @@ void P_MovePsprites (player_t *player)
if (psp->tics != -1) // a -1 tic count never changes
{
psp->tics--;
// [BC] Apply double firing speed.
if ( psp->tics && ( player->cheats & CF_DOUBLEFIRINGSPEED ))
psp->tics--;
if(!psp->tics)
{
P_SetPsprite (player, i, psp->state->GetNextState());

View file

@ -294,6 +294,10 @@ ACTOR PowerHighJump : Powerup native
{
}
ACTOR PowerDoubleFiringSpeed : Powerup native
{
}
ACTOR PowerMorph : Powerup native
{
Powerup.Duration -40