engine/EngineVideoLights.c
/*	Returns a colour sample from the lightmap.
*/
Returns a colour sample from the lightmap.
Returns a colour sample from the lightmap .
MathVector_t Light_GetSample(MathVector3f_t vPoint)
{
	MathVector3f_t	vEnd, vLightColour;
	MathVector_t	mvLightColour;
	if (!cl.worldmodel || !cl.worldmodel->lightdata)
	{
		Math_VectorSet(255.0f, vLightColour);
		Math_VectorToMV(vLightColour, mvLightColour);
		return mvLightColour;
	}
	vEnd[0] = vPoint[0];
	vEnd[1] = vPoint[1];
	vEnd[2] = vPoint[2]-2048.0f;
	Math_VectorClear(vLightColour);
	RecursiveLightPoint(vLightColour,cl.worldmodel->nodes,vPoint,vEnd);
	Math_VectorToMV(vLightColour,mvLightColour);
	return mvLightColour;
}
MathVector_t Light_GetSample ( MathVector3f_t vPoint ) { MathVector3f_t vEnd , vLightColour ; MathVector_t mvLightColour ; if ( ! cl . worldmodel || ! cl . worldmodel -> lightdata ) { Math_VectorSet ( 255.0f , vLightColour ) ; Math_VectorToMV ( vLightColour , mvLightColour ) ; return mvLightColour ; } vEnd [ 0 ] = vPoint [ 0 ] ; vEnd [ 1 ] = vPoint [ 1 ] ; vEnd [ 2 ] = vPoint [ 2 ] - 2048.0f ; Math_VectorClear ( vLightColour ) ; RecursiveLightPoint ( vLightColour , cl . worldmodel -> nodes , vPoint , vEnd ) ; Math_VectorToMV ( vLightColour , mvLightColour ) ; return mvLightColour ; }
Returns a colour sample from the lightmap.
Returns a colour sample from the lightmap .