light: FixLightOnFace: only check against model 0, otherwise triggers etc. are wrongly considered to block lights

This commit is contained in:
Eric Wasylishen 2016-05-31 18:18:25 -06:00
parent 5303dae5fc
commit 2d0ede48cf
1 changed files with 2 additions and 10 deletions

View File

@ -1237,18 +1237,10 @@ static bool Light_PointInSolid_r(const bsp2_t *bsp, int nodenum, const vec3_t po
}
}
// only check hull 0 of model 0 (world)
bool Light_PointInSolid(const bsp2_t *bsp, const vec3_t point )
{
/* check all models */
for (int i=0; i<bsp->nummodels; i++) {
// TODO: Take the model offset into account
if (Light_PointInSolid_r(bsp, bsp->dmodels[i].headnode[0], point))
return true;
}
return false;
return Light_PointInSolid_r(bsp, bsp->dmodels[0].headnode[0], point);
}
static void