From 9a9025b1ee3a3396d9a4e82749e4a6b96876e54a Mon Sep 17 00:00:00 2001
From: Yukita Mayako <catgirl@goddess.moe>
Date: Tue, 9 Jun 2015 06:59:34 -0400
Subject: [PATCH] Remove pmomz from players who are on ground.

Assume that every frame the player is on the ground, their pmomz will
be re-set properly if the floor is moving, therefore if the platform
STOPS, we need this to set it to 0.
---
 src/p_user.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/p_user.c b/src/p_user.c
index d6fc5b35ad..ce6e2b7326 100644
--- a/src/p_user.c
+++ b/src/p_user.c
@@ -9391,4 +9391,7 @@ void P_PlayerAfterThink(player_t *player)
 		player->mo->flags2 |= MF2_DONTDRAW;
 		player->mo->flags |= MF_NOGRAVITY;
 	}
+
+	if (P_IsObjectOnGround(player->mo))
+		player->mo->pmomz = 0;
 }
-- 
GitLab