Fix BIH generation crash for patches. ok'd eukara@ Spoike@
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5822 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2ccae3b1cf
commit
0f7294564a
1 changed files with 2 additions and 2 deletions
|
@ -4354,9 +4354,9 @@ static void CM_BuildBIH(model_t *mod, int submodel)
|
|||
|
||||
bihleafs = sub->num_brushes;
|
||||
for (i = 0; i < sub->num_patches; i++)
|
||||
bihleafs += prv->patches[prv->leafpatches[sub->firstpatch + i]].numfacets;
|
||||
bihleafs += prv->patches[sub->firstpatch + i].numfacets;
|
||||
for (i = 0; i < sub->num_cmeshes; i++)
|
||||
bihleafs += prv->cmeshes[prv->leafcmeshes[sub->firstcmesh + i]].numincidies/3;
|
||||
bihleafs += prv->cmeshes[sub->firstcmesh + i].numincidies/3;
|
||||
bihleaf = l = BZ_Malloc(sizeof(*bihleaf)*bihleafs);
|
||||
|
||||
//now we have enough storage, spit them out providing bounds info.
|
||||
|
|
Loading…
Reference in a new issue