From 78eae609cccf9d99100cb368fac56955b7b6d088 Mon Sep 17 00:00:00 2001
From: spherallic <spherallic@gmail.com>
Date: Mon, 26 Sep 2022 23:51:51 +0200
Subject: [PATCH] Start bustable FOF sounds at the correct height

---
 src/p_floor.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/p_floor.c b/src/p_floor.c
index b65435c21a..1028641c6e 100644
--- a/src/p_floor.c
+++ b/src/p_floor.c
@@ -1861,12 +1861,11 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
 		}
 	}
 
-#undef controlsec
-
-	// soundorg z height never gets set normally, so MEH.
-	sec->soundorg.z = sec->floorheight;
+	sec->soundorg.z = (controlsec->floorheight + controlsec->ceilingheight)/2;
 	S_StartSound(&sec->soundorg, mobjinfo[type].activesound);
 
+#undef controlsec
+
 	// Find the outermost vertexes in the subsector
 	for (i = 0; i < sec->linecount; i++)
 	{
-- 
GitLab