- 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
|
|
@ -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)
|
||||
{
|
||||
|
|
@ -2212,11 +2213,11 @@ void P_PlayerThink (player_t *player)
|
|||
|
||||
if (crouchdir == 0)
|
||||
{
|
||||
crouchdir = (player->cmd.ucmd.buttons & BT_CROUCH)? -1 : 1;
|
||||
crouchdir = (player->cmd.ucmd.buttons & BT_CROUCH) ? -1 : 1;
|
||||
}
|
||||
else if (player->cmd.ucmd.buttons & BT_CROUCH)
|
||||
{
|
||||
player->crouching=0;
|
||||
player->crouching = 0;
|
||||
}
|
||||
if (crouchdir == 1 && player->crouchfactor < FRACUNIT &&
|
||||
player->mo->z + player->mo->height < player->mo->ceilingz)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue