From 67da64a06456de84e435e5bf26cbe521e09f0e59 Mon Sep 17 00:00:00 2001
From: mazmazz <mar.marcoz@outlook.com>
Date: Wed, 15 Aug 2018 18:50:28 -0400
Subject: [PATCH] Use more efficient position setting. For Z, also adjust for
 bumper mobj scale.

---
 src/p_user.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/p_user.c b/src/p_user.c
index 595e9566e3..551b7c5f33 100644
--- a/src/p_user.c
+++ b/src/p_user.c
@@ -6180,7 +6180,11 @@ static void P_NiGHTSMovement(player_t *player)
 		// Center player to bumper here because if you try to set player's position in P_TouchSpecialThing case MT_NIGHTSBUMPER,
 		// that position is fudged in the time between that routine in the previous tic
 		// and reaching here in the current tic
-		P_TeleportMove(player->mo, player->mo->hnext->x, player->mo->hnext->y, player->mo->hnext->z + (player->mo->hnext->height/4));
+		P_UnsetThingPosition(player->mo);
+		player->mo->x = player->mo->hnext->x;
+		player->mo->y = player->mo->hnext->y;
+		player->mo->z = player->mo->hnext->z + FixedMul(player->mo->hnext->height/4, player->mo->hnext->scale);
+		P_SetThingPosition(player->mo);
 		P_SetTarget(&player->mo->hnext, NULL);
 	}
 
-- 
GitLab