Skip to content

Commit

Permalink
- Duke: Directly check the backend input code's crouch_toggle to al…
Browse files Browse the repository at this point in the history
…ways remain crouched after pausing, even if the first tic doesn't have input.

* This is needed because unlike the other games, Duke doesn't have any decent state manager for the player like Blood and SW do.
  • Loading branch information
mjr4077au committed Jan 13, 2022
1 parent 85cce11 commit 40ffb23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/games/duke/src/player_d.cpp
Expand Up @@ -1867,7 +1867,7 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, int fz, int

p->on_warping_sector = 0;

if (actions & SB_CROUCH)
if ((actions & SB_CROUCH) || crouch_toggle)
{
playerCrouch(snum);
}
Expand Down
2 changes: 1 addition & 1 deletion source/games/duke/src/player_r.cpp
Expand Up @@ -2228,7 +2228,7 @@ static void movement(int snum, ESyncBits actions, sectortype* psect, int fz, int

p->on_warping_sector = 0;

if ((actions & SB_CROUCH) && !p->OnMotorcycle)
if (((actions & SB_CROUCH) || crouch_toggle) && !p->OnMotorcycle)
{
playerCrouch(snum);
}
Expand Down

0 comments on commit 40ffb23

Please sign in to comment.