From 689451848520435a6713d69e012eddfabd849ac5 Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Thu, 21 Feb 2013 11:31:22 +1030 Subject: [PATCH] qbsp: don't allocate bmodel space for detail entities Signed-off-by: Kevin Shanahan --- qbsp/map.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qbsp/map.c b/qbsp/map.c index 37ef42bd..7971302d 100644 --- a/qbsp/map.c +++ b/qbsp/map.c @@ -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; }