From fc72bbb935015fb50c090e1cf070007f11f63504 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Tue, 28 Aug 2018 21:23:08 -0600 Subject: [PATCH] qbsp: fix _mirrorinside on bmodels so that they have CONTENTS_SOLID as expected --- qbsp/brush.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qbsp/brush.cc b/qbsp/brush.cc index a23197de..bcf6dc74 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -1222,12 +1222,16 @@ Brush_LoadEntity(mapentity_t *dst, const mapentity_t *src, const int hullnum) if (dst != pWorldEnt()) contents = CONTENTS_SOLID; - /* Hack to turn bmodels with "_mirrorinside" into func_detail_illusionary in hull 0. - this is to allow "_mirrorinside" to work on func_illusionary, etc. + /* Hack to turn bmodels with "_mirrorinside" into func_detail_fence in hull 0. + this is to allow "_mirrorinside" to work on func_illusionary, func_wall, etc. Otherwise they would be CONTENTS_SOLID and the inside faces would be deleted. + + It's CONTENTS_DETAIL_FENCE because this gets mapped to CONTENTS_SOLID just + before writing the bsp, and bmodels normally have CONTENTS_SOLID as their + contents type. */ if (dst != pWorldEnt() && hullnum == 0 && (cflags & CFLAGS_BMODEL_MIRROR_INSIDE)) { - contents = CONTENTS_DETAIL_ILLUSIONARY; + contents = CONTENTS_DETAIL_FENCE; } /* nonsolid brushes don't show up in clipping hulls */