From 8068fca60133634e4fa67004cd86f7c91039ec07 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 31 Jan 2016 22:36:37 +0100 Subject: [PATCH 1/3] - fixed: player_t::Uncrouch should only reset the view height if the player is actually crouched. --- src/d_player.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/d_player.h b/src/d_player.h index d6b039896c..5ada741dc0 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -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 From a1cd0401e4fa18f6419d446bbe992cf00fe06e49 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 31 Jan 2016 22:38:08 +0100 Subject: [PATCH 2/3] - fixed: noclip2 should only set some minimal velocity if the player has none. --- src/m_cheat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index b6316f732a..1d80f13f26 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -136,7 +136,7 @@ void cht_DoCheat (player_t *player, int cheat) player->cheats &= ~CF_NOCLIP; msg = GStrings("STSTR_NCOFF"); } - player->mo->velx = 1; // force some lateral movement so that internal variables are up to date + if (player->mo->velx == 0) player->mo->velx = 1; // force some lateral movement so that internal variables are up to date break; case CHT_NOVELOCITY: From 4cbf752b4dc6e350049abf98ca3e1fdeb7fe260f Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Sun, 31 Jan 2016 23:19:34 +0100 Subject: [PATCH 3/3] - Fixed uninitialized variable in level info code. Found with Valgrind. --- src/g_mapinfo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/g_mapinfo.cpp b/src/g_mapinfo.cpp index 9dace3e237..dfcd2e6141 100644 --- a/src/g_mapinfo.cpp +++ b/src/g_mapinfo.cpp @@ -240,6 +240,7 @@ void level_info_t::Reset() flags2 = 0; else flags2 = LEVEL2_LAXMONSTERACTIVATION; + flags3 = 0; Music = ""; LevelName = ""; FadeTable = "COLORMAP";