From 97e2fe18c6d36fae3d1321de3d26e47163ba5d84 Mon Sep 17 00:00:00 2001
From: katsy <katmint@live.com>
Date: Mon, 6 Dec 2021 18:00:30 -0600
Subject: [PATCH] fix spike sandwich teleportation issue

---
 src/p_map.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/p_map.c b/src/p_map.c
index 836e75c4e8..59756d8a62 100644
--- a/src/p_map.c
+++ b/src/p_map.c
@@ -1152,9 +1152,9 @@ static boolean PIT_CheckThing(mobj_t *thing)
 			return true; // underneath
 
 		if (tmthing->eflags & MFE_VERTICALFLIP)
-			thing->z = tmthing->z - thing->height - FixedMul(FRACUNIT, tmthing->scale);
+			P_TeleportMove(thing, thing->x, thing->y, tmthing->z - thing->height - FixedMul(FRACUNIT, tmthing->scale));
 		else
-			thing->z = tmthing->z + tmthing->height + FixedMul(FRACUNIT, tmthing->scale);
+			P_TeleportMove(thing, thing->x, thing->y, tmthing->z + tmthing->height + FixedMul(FRACUNIT, tmthing->scale));
 		if (thing->flags & MF_SHOOTABLE)
 			P_DamageMobj(thing, tmthing, tmthing, 1, DMG_SPIKE);
 		return true;
-- 
GitLab