From 2733571d278434f9eb10ace21aaac90272888a21 Mon Sep 17 00:00:00 2001
From: toaster <rollerorbital@gmail.com>
Date: Tue, 16 Aug 2022 20:08:52 +0100
Subject: [PATCH] Fix the interp-related Ancient Tomb FOF flickering.

Notably caused by a difference in behaviour between Software and GL that was already resynchronised in the 2.2 codebase.
---
 src/hardware/hw_main.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c
index 90c969987..397ef6371 100644
--- a/src/hardware/hw_main.c
+++ b/src/hardware/hw_main.c
@@ -2468,7 +2468,23 @@ void HWR_Subsector(size_t num)
 
 	if (gr_frontsector->ffloors)
 	{
-		if (gr_frontsector->moved)
+		boolean anyMoved = gr_frontsector->moved;
+
+		if (anyMoved == false)
+		{
+			for (rover = gr_frontsector->ffloors; rover; rover = rover->next)
+			{
+				sector_t *controlSec = &sectors[rover->secnum];
+
+				if (controlSec->moved == true)
+				{
+					anyMoved = true;
+					break;
+				}
+			}
+		}
+
+		if (anyMoved == true)
 		{
 			gr_frontsector->numlights = sub->sector->numlights = 0;
 			R_Prep3DFloors(gr_frontsector);
-- 
GitLab