qbsp: fix _mirrorinside on bmodels so that they have CONTENTS_SOLID

as expected
This commit is contained in:
Eric Wasylishen 2018-08-28 21:23:08 -06:00
parent d53c298bd8
commit fc72bbb935
1 changed files with 7 additions and 3 deletions

View File

@ -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 */