From 54d7f50b3818828b881747c080804a4c17c2fb11 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sat, 25 Sep 2021 18:04:57 -0600 Subject: [PATCH] brush.cc: clear CFLAGS_CLIP on bmodels to match old behaviour --- qbsp/brush.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qbsp/brush.cc b/qbsp/brush.cc index d1e8ce8f..93815988 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -1398,8 +1398,13 @@ Brush_LoadEntity(mapentity_t *dst, const mapentity_t *src, const int hullnum) } /* entities never use water merging */ - if (dst != pWorldEnt()) + if (dst != pWorldEnt()) { + // FIXME: the old code here was just `contents = CONTENTS_SOLID`. + // which would also clear CONTENTS_CLIP. Now CONTENTS_CLIP is an extended flag + // so we need to unset it explicitly. contents = contents.merge(options.target_game->create_solid_contents()); + contents.extended &= ~CFLAGS_CLIP; + } /* 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.