remove Q2_CONTENTS_TRANSLUCENT on load, since it breaks stuff

more areaportal fatal -> warning
This commit is contained in:
Jonathan 2022-06-01 18:36:09 -04:00
parent 8b4bd6deeb
commit f64c8e7160
2 changed files with 18 additions and 1 deletions

View File

@ -1400,6 +1400,9 @@ static void ParseTextureDef(parser_t &parser, mapface_t &mapface, const mapbrush
} else if (!extinfo.info) {
extinfo.info = extended_texinfo_t{};
}
// remove TRANSLUCENT; it's only meant to be set by the compiler
extinfo.info->contents.native &= ~Q2_CONTENTS_TRANSLUCENT;
}
tx->miptex = FindMiptex(mapface.texname.c_str(), extinfo.info);

View File

@ -456,7 +456,14 @@ static void FloodAreas_r(node_t *node)
if (node->planenum == PLANENUM_LEAF && node->contents.native == Q2_CONTENTS_AREAPORTAL) {
// grab the func_areanode entity
mapentity_t *entity = AreanodeEntityForLeaf(node);
Q_assert(entity != nullptr);
if (entity == nullptr)
{
logging::print("WARNING: areaportal contents in node, but no entity found {} -> {}\n",
node->bounds.mins(),
node->bounds.maxs());
return;
}
// this node is part of an area portal;
// if the current area has allready touched this
@ -555,6 +562,13 @@ static void SetAreaPortalAreas_r(node_t *node)
// grab the func_areanode entity
mapentity_t *entity = AreanodeEntityForLeaf(node);
if (!entity)
{
logging::print("WARNING: areaportal missing for node: {} -> {}\n",
node->bounds.mins(), node->bounds.maxs());
return;
}
node->area = entity->portalareas[0];
if (!entity->portalareas[1]) {
logging::print("WARNING: areaportal entity {} doesn't touch two areas\n Entity Bounds: {} -> {}\n",