- fixed: player_t::Uncrouch should only reset the view height if the player is actually crouched.

This commit is contained in:
Christoph Oelckers 2016-01-31 22:36:37 +01:00
parent c3cc98b5f3
commit 8068fca601
1 changed files with 9 additions and 6 deletions

View File

@ -487,12 +487,15 @@ public:
void Uncrouch()
{
crouchfactor = FRACUNIT;
crouchoffset = 0;
crouchdir = 0;
crouching = 0;
crouchviewdelta = 0;
viewheight = mo->ViewHeight;
if (crouchfactor != FRACUNIT)
{
crouchfactor = FRACUNIT;
crouchoffset = 0;
crouchdir = 0;
crouching = 0;
crouchviewdelta = 0;
viewheight = mo->ViewHeight;
}
}
bool CanCrouch() const