diff --git a/qbsp/brush.cc b/qbsp/brush.cc index edbc0517..5b1c6874 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -881,8 +881,8 @@ static void Brush_LoadEntity(mapentity_t *dst, const mapentity_t *src, const int const std::optional mirrorinside = mirrorinside_set ? decltype(mirrorinside)(atoi(ValueForKey(src, "_mirrorinside")) ? true : false) : std::nullopt; /* _noclipfaces */ - const bool noclipfaces_set = *ValueForKey(src, "_mirrorinside"); - const std::optional noclipfaces = mirrorinside_set ? decltype(noclipfaces)(atoi(ValueForKey(src, "_noclipfaces")) ? false : true) : std::nullopt; + const bool noclipfaces_set = *ValueForKey(src, "_noclipfaces"); + const std::optional clipsametype = noclipfaces_set ? decltype(clipsametype)(atoi(ValueForKey(src, "_noclipfaces")) ? false : true) : std::nullopt; const bool func_illusionary_visblocker = (0 == Q_strcasecmp(classname, "func_illusionary_visblocker")); @@ -989,7 +989,7 @@ static void Brush_LoadEntity(mapentity_t *dst, const mapentity_t *src, const int // apply extended flags contents.set_mirrored(mirrorinside); - contents.set_clips_same_type(noclipfaces); + contents.set_clips_same_type(clipsametype); if (func_illusionary_visblocker) { contents.extended |= CFLAGS_ILLUSIONARY_VISBLOCKER; } diff --git a/qbsp/csg4.cc b/qbsp/csg4.cc index 30b9d9b4..4ebec62a 100644 --- a/qbsp/csg4.cc +++ b/qbsp/csg4.cc @@ -426,7 +426,7 @@ Returns a >= b as far as brush clipping bool BrushGE(const brush_t& a, const brush_t& b) { // same contents clip each other - if (a.contents == b.contents && a.contents.will_clip_same_type(options.target_game)) { + if (a.contents.will_clip_same_type(options.target_game, b.contents)) { // map file order return a.file_order > b.file_order; }