mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Fixed: Totally freezing a player did not ignore crouch toggling.
SVN r3341 (trunk)
This commit is contained in:
parent
00d3e1975f
commit
d9713669f1
3 changed files with 13 additions and 5 deletions
|
@ -2353,9 +2353,10 @@ void Net_DoCommand (int type, BYTE **stream, int player)
|
||||||
|
|
||||||
case DEM_CROUCH:
|
case DEM_CROUCH:
|
||||||
if (gamestate == GS_LEVEL && players[player].mo != NULL &&
|
if (gamestate == GS_LEVEL && players[player].mo != NULL &&
|
||||||
players[player].health > 0 && !(players[player].oldbuttons & BT_JUMP))
|
players[player].health > 0 && !(players[player].oldbuttons & BT_JUMP) &&
|
||||||
|
!P_IsPlayerTotallyFrozen(&players[player]))
|
||||||
{
|
{
|
||||||
players[player].crouching = players[player].crouchdir<0? 1 : -1;
|
players[player].crouching = players[player].crouchdir < 0 ? 1 : -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -426,6 +426,8 @@ void P_CheckPlayerSprites();
|
||||||
|
|
||||||
#define CROUCHSPEED (FRACUNIT/12)
|
#define CROUCHSPEED (FRACUNIT/12)
|
||||||
|
|
||||||
|
bool P_IsPlayerTotallyFrozen(const player_t *player);
|
||||||
|
|
||||||
// [GRB] Custom player classes
|
// [GRB] Custom player classes
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|
|
@ -2126,9 +2126,7 @@ void P_PlayerThink (player_t *player)
|
||||||
player->mo->flags &= ~MF_JUSTATTACKED;
|
player->mo->flags &= ~MF_JUSTATTACKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool totallyfrozen = (player->cheats & CF_TOTALLYFROZEN || gamestate == GS_TITLELEVEL ||
|
bool totallyfrozen = P_IsPlayerTotallyFrozen(player);
|
||||||
(( level.flags2 & LEVEL2_FROZEN ) && ( player == NULL || !( player->cheats & CF_TIMEFREEZE )))
|
|
||||||
);
|
|
||||||
|
|
||||||
// [RH] Being totally frozen zeros out most input parameters.
|
// [RH] Being totally frozen zeros out most input parameters.
|
||||||
if (totallyfrozen)
|
if (totallyfrozen)
|
||||||
|
@ -2723,3 +2721,10 @@ void P_EnumPlayerColorSets(FName classname, TArray<int> *out)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool P_IsPlayerTotallyFrozen(const player_t *player)
|
||||||
|
{
|
||||||
|
return
|
||||||
|
gamestate == GS_TITLELEVEL ||
|
||||||
|
player->cheats & CF_TOTALLYFROZEN ||
|
||||||
|
((level.flags2 & LEVEL2_FROZEN) && !(player->cheats & CF_TIMEFREEZE));
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue