From 50917d2ee2e3103a1aeac10e3aed2b1d4ad3e75c Mon Sep 17 00:00:00 2001
From: Monster Iestyn <iestynjealous@ntlworld.com>
Date: Wed, 30 Aug 2017 19:21:23 +0100
Subject: [PATCH] P_FloorzAtPos: Check the normal floor's slope as well as FOF
 slopes, silly.

---
 src/p_map.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/p_map.c b/src/p_map.c
index 81bf9ebeec..f319acea81 100644
--- a/src/p_map.c
+++ b/src/p_map.c
@@ -4000,6 +4000,11 @@ fixed_t P_FloorzAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height)
 	sector_t *sec = R_PointInSubsector(x, y)->sector;
 	fixed_t floorz = sec->floorheight;
 
+#ifdef ESLOPE
+	if (sec->f_slope)
+		floorz = P_GetZAt(sec->f_slope, x, y);
+#endif
+
 	// Intercept the stupid 'fall through 3dfloors' bug Tails 03-17-2002
 	if (sec->ffloors)
 	{
-- 
GitLab