From 877af6733077c1f99756d9adf3eeca191d3bab86 Mon Sep 17 00:00:00 2001
From: bones_was_here <bones_was_here@xonotic.au>
Date: Sat, 15 Jul 2023 22:28:32 +1000
Subject: [PATCH] Q1BSP: Fix TraceBox failing to move a bbox out of solid

Fixes https://github.com/DarkPlacesEngine/darkplaces/issues/85

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
---
 model_brush.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/model_brush.c b/model_brush.c
index 4fbf53b5..e03c2b58 100644
--- a/model_brush.c
+++ b/model_brush.c
@@ -762,7 +762,7 @@ static int Mod_Q1BSP_RecursiveHullCheck(RecursiveHullCheckTraceInfo_t *t, int nu
 			// recurse both sides, front side first
 			ret = Mod_Q1BSP_RecursiveHullCheck(t, node->children[p1side], p1f, midf, p1, mid);
 			// if this side is not empty, return what it is (solid or done)
-			if (ret != HULLCHECKSTATE_EMPTY)
+			if (ret != HULLCHECKSTATE_EMPTY && !t->trace->allsolid)
 				return ret;
 
 			ret = Mod_Q1BSP_RecursiveHullCheck(t, node->children[p2side], midf, p2f, mid, p2);
-- 
2.39.5