diff --git a/src/client/cl_tc_vis.c b/src/client/cl_tc_vis.c index 7d694bee..ae6c0f08 100644 --- a/src/client/cl_tc_vis.c +++ b/src/client/cl_tc_vis.c @@ -481,12 +481,22 @@ static qboolean CullFace(const visFace_t *face) { static void draw(visBrushNode_t *brush, qhandle_t shader) { frustum = re.GetFrustum(); + vec3_t clientOrigin; + VectorCopy(cl.cgameClientLerpOrigin, clientOrigin); + while (brush) { int i; for (i = 0; i < brush->numFaces; ++i) { - if (CullFace(brush->faces + i)) continue; + if (CullFace(brush->faces + i)) { + continue; + } + + if (!re.inPVS(clientOrigin, brush->faces->mins) && !re.inPVS(clientOrigin, brush->faces->maxs)) { + continue; + } + re.AddPolyToScene(shader, brush->faces[i].numVerts, brush->faces[i].verts); } brush = brush->next; } -} \ No newline at end of file +}