qbsp: fix simple_worldspawn_detail_wall

This commit is contained in:
Eric Wasylishen 2022-06-20 23:05:56 -06:00
parent 3276cfec56
commit e39c8f9cf6
3 changed files with 9 additions and 3 deletions

View File

@ -381,6 +381,10 @@ public:
bool directional_visible_contents(const contentflags_t &a, const contentflags_t &b) const override
{
if (contents_priority(b) > contents_priority(a)) {
return true;
}
if (a.is_empty(this)) {
// empty can always see whatever is in `b`
return true;

View File

@ -69,7 +69,7 @@ static face_t *TryMerge(face_t *f1, face_t *f2)
bool keep1, keep2;
if (!f1->w.size() || !f2->w.size() || f1->planeside != f2->planeside || f1->texinfo != f2->texinfo ||
!f1->contents[0].equals(options.target_game, f2->contents[0]) || !f1->contents[1].equals(options.target_game, f2->contents[1]) ||
/*!f1->contents[0].equals(options.target_game, f2->contents[0]) ||*/ !f1->contents[1].equals(options.target_game, f2->contents[1]) ||
f1->lmshift[0] != f2->lmshift[0] || f1->lmshift[1] != f2->lmshift[1])
return NULL;

View File

@ -769,12 +769,14 @@ static face_t *FaceFromPortal(portal_t *p, int pside)
{
f->w = p->winding->flip();
// fixme-brushbsp: was just `f->contents` on qbsp3
f->contents[1] = p->nodes[1]->contents;
f->contents[0] = p->nodes[1]->contents;
f->contents[1] = p->nodes[0]->contents;
}
else
{
f->w = *p->winding;
f->contents[1] = p->nodes[0]->contents;
f->contents[0] = p->nodes[0]->contents;
f->contents[1] = p->nodes[1]->contents;
}
UpdateFaceSphere(f);