qbsp: don't allocate bmodel space for detail entities

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2013-02-21 11:31:22 +10:30
parent 6bc1df862a
commit 6894518485
1 changed files with 3 additions and 1 deletions

View File

@ -551,7 +551,9 @@ LoadMapFile(void)
map.numfaces = map.numbrushes = map.numentities = 0;
ent = map.entities;
while (ParseEntity(&parser, ent)) {
if (ent->nummapbrushes) {
/* Allocate memory for the bmodel, if needed. */
const char *classname = ValueForKey(ent, "classname");
if (strcmp(classname, "func_detail") && ent->nummapbrushes) {
ent->lumps[BSPMODEL].data = AllocMem(BSPMODEL, 1, true);
ent->lumps[BSPMODEL].count = 1;
}