mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 22:51:39 +00:00
- Added CROUCHABLEMORPH flag for the PlayerPawn class. Use this to indicate that a morphed
player class can crouch. (Regular players can always crouch, hence the name CROUCHABLEMORPH and not CANMORPH or ALLOWMORPH.) SVN r4221 (trunk)
This commit is contained in:
parent
a50e670c0c
commit
cb64014494
3 changed files with 6 additions and 3 deletions
|
@ -163,6 +163,7 @@ enum
|
|||
{
|
||||
PPF_NOTHRUSTWHENINVUL = 1, // Attacks do not thrust the player if they are invulnerable.
|
||||
PPF_CANSUPERMORPH = 2, // Being remorphed into this class can give you a Tome of Power
|
||||
PPF_CROUCHABLEMORPH = 4, // This morphed player can crouch
|
||||
};
|
||||
|
||||
//
|
||||
|
|
|
@ -2204,7 +2204,8 @@ void P_PlayerThink (player_t *player)
|
|||
{
|
||||
player->cmd.ucmd.buttons &= ~BT_CROUCH;
|
||||
}
|
||||
if (player->morphTics == 0 && player->health > 0 && level.IsCrouchingAllowed())
|
||||
if ((player->morphTics == 0 || player->mo->PlayerFlags & PPF_CROUCHABLEMORPH)
|
||||
&& player->health > 0 && level.IsCrouchingAllowed())
|
||||
{
|
||||
if (!totallyfrozen)
|
||||
{
|
||||
|
|
|
@ -336,6 +336,7 @@ static FFlagDef PlayerPawnFlags[] =
|
|||
// PlayerPawn flags
|
||||
DEFINE_FLAG(PPF, NOTHRUSTWHENINVUL, APlayerPawn, PlayerFlags),
|
||||
DEFINE_FLAG(PPF, CANSUPERMORPH, APlayerPawn, PlayerFlags),
|
||||
DEFINE_FLAG(PPF, CROUCHABLEMORPH, APlayerPawn, PlayerFlags),
|
||||
};
|
||||
|
||||
static FFlagDef PowerSpeedFlags[] =
|
||||
|
|
Loading…
Reference in a new issue