qbsp: attempted fix of -wrbrushes (ProcessEntity behaviour was changed
a while ago and copy/pasted code in BSPX_CreateBrushList wasn't updated)
This commit is contained in:
parent
04601656ff
commit
209d481b4c
47
qbsp/qbsp.cc
47
qbsp/qbsp.cc
|
|
@ -91,6 +91,7 @@ ProcessEntity(mapentity_t *entity, const int hullnum)
|
||||||
Message(msgProgress, "Brush_LoadEntity");
|
Message(msgProgress, "Brush_LoadEntity");
|
||||||
Brush_LoadEntity(entity, entity, hullnum);
|
Brush_LoadEntity(entity, entity, hullnum);
|
||||||
|
|
||||||
|
// FIXME: copied and pasted to BSPX_CreateBrushList
|
||||||
/*
|
/*
|
||||||
* If this is the world entity, find all func_group and func_detail
|
* If this is the world entity, find all func_group and func_detail
|
||||||
* entities and add their brushes with the appropriate contents flag set.
|
* entities and add their brushes with the appropriate contents flag set.
|
||||||
|
|
@ -485,35 +486,43 @@ static void BSPX_CreateBrushList(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
ent->brushes = NULL;
|
ent->brushes = NULL;
|
||||||
|
ent->detail_illusionary = NULL;
|
||||||
|
ent->liquid = NULL;
|
||||||
|
ent->detail_fence = NULL;
|
||||||
|
ent->detail = NULL;
|
||||||
|
ent->sky = NULL;
|
||||||
|
ent->solid = NULL;
|
||||||
|
|
||||||
ent->numbrushes = 0;
|
ent->numbrushes = 0;
|
||||||
Brush_LoadEntity (ent, ent, -1);
|
Brush_LoadEntity (ent, ent, -1);
|
||||||
if (!ent->brushes)
|
|
||||||
continue; // non-bmodel entity
|
|
||||||
|
|
||||||
|
// FIXME: copied and pasted from ProcessEntity
|
||||||
/*
|
/*
|
||||||
* If this is the world entity, find all func_group and func_detail
|
* If this is the world entity, find all func_group and func_detail
|
||||||
* entities and add their brushes with the appropriate contents flag set.
|
* entities and add their brushes with the appropriate contents flag set.
|
||||||
*/
|
*/
|
||||||
if (ent == pWorldEnt()) {
|
if (ent == pWorldEnt()) {
|
||||||
const char *classname;
|
/*
|
||||||
const mapentity_t *source;
|
* We no longer care about the order of adding func_detail and func_group,
|
||||||
int i;
|
* Entity_SortBrushes will sort the brushes
|
||||||
/* Add func_group brushes first */
|
*/
|
||||||
for (i = 1; i < map.numentities(); i++) {
|
for (int i = 1; i < map.numentities(); i++) {
|
||||||
source = &map.entities.at(i);
|
mapentity_t *source = &map.entities.at(i);
|
||||||
classname = ValueForKey(source, "classname");
|
|
||||||
if (!Q_strcasecmp(classname, "func_group"))
|
/* Load external .map and change the classname, if needed */
|
||||||
Brush_LoadEntity(ent, source, -1);
|
ProcessExternalMapEntity(source);
|
||||||
}
|
|
||||||
/* Add detail brushes next */
|
if (IsWorldBrushEntity(source)) {
|
||||||
for (i = 1; i < map.numentities(); i++) {
|
Brush_LoadEntity(ent, source, -1);
|
||||||
source = &map.entities.at(i);
|
|
||||||
classname = ValueForKey(source, "classname");
|
|
||||||
if (!Q_strcasecmp(classname, "func_detail"))
|
|
||||||
Brush_LoadEntity(ent, source, -1);
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Entity_SortBrushes(ent);
|
||||||
|
|
||||||
|
if (!ent->brushes)
|
||||||
|
continue; // non-bmodel entity
|
||||||
|
|
||||||
BSPX_Brushes_AddModel(&ctx, modelnum , ent->brushes);
|
BSPX_Brushes_AddModel(&ctx, modelnum , ent->brushes);
|
||||||
FreeBrushes(ent);
|
FreeBrushes(ent);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue