Fix miscalculation for has_struct

Remove unused variable
This commit is contained in:
Jonathan 2022-01-23 21:48:24 -05:00
parent 5d6d7a71a2
commit e92b9f1ff9
2 changed files with 5 additions and 3 deletions

View File

@ -248,6 +248,7 @@ struct surface_t
{
bounds = {};
lmshift = std::numeric_limits<short>::max();
has_struct = false;
for (const face_t *f = faces; f; f = f->next) {
for (auto &contents : f->contents)
@ -256,8 +257,10 @@ struct surface_t
lmshift = min(f->lmshift.front, f->lmshift.back);
has_struct = !((f->contents[0].extended | f->contents[1].extended) &
(CFLAGS_DETAIL | CFLAGS_DETAIL_ILLUSIONARY | CFLAGS_DETAIL_FENCE | CFLAGS_WAS_ILLUSIONARY));
if (!((f->contents[0].extended | f->contents[1].extended) &
(CFLAGS_DETAIL | CFLAGS_DETAIL_ILLUSIONARY | CFLAGS_DETAIL_FENCE | CFLAGS_WAS_ILLUSIONARY))) {
has_struct = true;
}
bounds += f->w.bounds();

View File

@ -230,7 +230,6 @@ MergeAll
*/
void MergeAll(std::list<surface_t> &surfhead)
{
surface_t *surf;
int mergefaces = 0;
face_t *f;