qbsp: fix underwater hint brushes

At load time we defaulted to CONTENTS_EMPTY, but if part or all of the
brush lies underwater, then inherit the water contents type.

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2013-03-07 07:25:29 +10:30
parent 7fa24021c8
commit 406acb62d1
1 changed files with 6 additions and 0 deletions

View File

@ -357,6 +357,12 @@ KeepInsideFaces(face_t *face, const brush_t *brush)
next = face->next;
face->contents[0] = brush->contents;
face->cflags[0] = brush->cflags;
/*
* If the inside brush is empty space, inherit the outside contents.
* The only brushes with empty contents currently are hint brushes.
*/
if (face->contents[1] == CONTENTS_EMPTY)
face->contents[1] = brush->contents;
face->next = outside;
outside = face;
face = next;