qbsp: fix brush_clipping_order
This commit is contained in:
parent
4f3ca8c252
commit
5c5e6e1ea7
|
|
@ -453,8 +453,11 @@ static void FindPortalSide(portal_t *p)
|
|||
node_t *n = p->nodes[j];
|
||||
auto p1 = map.planes.at(p->onnode->planenum);
|
||||
|
||||
for (brush_t *brush : n->original_brushes)
|
||||
// iterate the n->original_brushes vector in reverse order, so later brushes
|
||||
// in the map file order are prioritized
|
||||
for (auto it = n->original_brushes.rbegin(); it != n->original_brushes.rend(); ++it)
|
||||
{
|
||||
auto *brush = *it;
|
||||
if (!options.target_game->contents_contains(brush->contents, viscontents))
|
||||
continue;
|
||||
for (face_t &side : brush->faces)
|
||||
|
|
|
|||
|
|
@ -896,15 +896,14 @@ static void ProcessEntity(mapentity_t *entity, const int hullnum)
|
|||
tree = BrushBSP(entity, false);
|
||||
}
|
||||
|
||||
FreeTreePortals_r(tree->headnode);
|
||||
|
||||
PruneNodes(tree->headnode);
|
||||
|
||||
MakeTreePortals(tree);
|
||||
|
||||
MarkVisibleSides(tree, entity);
|
||||
MakeFaces(tree->headnode);
|
||||
|
||||
FreeTreePortals_r(tree->headnode);
|
||||
PruneNodes(tree->headnode);
|
||||
|
||||
if (hullnum <= 0 && entity == map.world_entity() && !map.leakfile) {
|
||||
WritePortalFile(tree);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue