level/light_trace.c
/*
==============================================================================

LINE TRACING

The major lighting operation is a point to point visibility test, performed
by recursive subdivision of the line by the BSP tree.

==============================================================================
*/
LINE TRACING
The major lighting operation is a point to point visibility test, performed
by recursive subdivision of the line by the BSP tree.
LINE TRACING The major lighting operation is a point to point visibility test performed by recursive subdivision of the line by the BSP tree .
BSPLeaf_t *Light_PointInLeaf( const vec3_t point )
{
	int num = 0;
	while( num >= 0 )
		num = dnodes[num].iChildren[PlaneDiff(point,&dplanes[dnodes[num].iPlaneNum]) < 0];
	return dleafs + (-1 - num);
}
BSPLeaf_t * Light_PointInLeaf ( const vec3_t point ) { int num = 0 ; while ( num >= 0 ) num = dnodes [ num ] . iChildren [ PlaneDiff ( point , & dplanes [ dnodes [ num ] . iPlaneNum ] ) < 0 ] ; return dleafs + ( -1 - num ) ; }
LINE TRACING
The major lighting operation is a point to point visibility test, performed
by recursive subdivision of the line by the BSP tree.
LINE TRACING The major lighting operation is a point to point visibility test performed by recursive subdivision of the line by the BSP tree .