1
0
Fork 0
forked from fte/fteqw

Fix rendering of turb surfaces on HLBSP

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5886 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Eukara 2021-06-18 20:37:57 +00:00
parent 868f13cb29
commit 9194f5cddf

View file

@ -5484,8 +5484,10 @@ TRACE(("LoadBrushModel %i\n", __LINE__));
{
if (mod->surfaces[j].flags & SURF_DRAWTURB)
{
if (mod->surfaces[j].plane->type == PLANE_Z && mod->surfaces[j].plane->dist == bm->maxs[2]-1)
float mid = bm->mins[2] + (0.5 * (bm->maxs[2] - bm->mins[2]));
if (mod->surfaces[j].plane->type == PLANE_Z && mod->surfaces[j].plane->dist >= mid) {
continue;
}
mod->surfaces[j].flags |= SURF_NODRAW;
}
}