qbsp: pass entity into AddToBounds

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2013-02-10 16:43:37 +10:30
parent 262ffab5d5
commit a6990fb2b6
1 changed files with 7 additions and 7 deletions

View File

@ -107,15 +107,15 @@ AddToBounds
=================
*/
static void
AddToBounds(vec3_t v)
AddToBounds(mapentity_t *ent, const vec3_t point)
{
int i;
for (i = 0; i < 3; i++) {
if (v[i] < pCurEnt->mins[i])
pCurEnt->mins[i] = v[i];
if (v[i] > pCurEnt->maxs[i])
pCurEnt->maxs[i] = v[i];
if (point[i] < ent->mins[i])
ent->mins[i] = point[i];
if (point[i] > ent->maxs[i])
ent->maxs[i] = point[i];
}
}
@ -864,8 +864,8 @@ Brush_LoadEntity(void)
other = b;
}
AddToBounds(b->mins);
AddToBounds(b->maxs);
AddToBounds(pCurEnt, b->mins);
AddToBounds(pCurEnt, b->maxs);
}
// add all of the water textures at the start