Source/ThunderBeast/QuakeToon/server/sv_ents.c
void SV_FatPVS (vec3_t org)
{
	int		leafs[64];
	int		i, j, count;
	int		longs;
	byte	*src;
	vec3_t	mins, maxs;

	for (i=0 ; i<3 ; i++)
	{
		mins[i] = org[i] - 8;
		maxs[i] = org[i] + 8;
	}

	count = CM_BoxLeafnums (mins, maxs, leafs, 64, NULL);
	if (count < 1)
		Com_Error (ERR_FATAL, "SV_FatPVS: count < 1");
	longs = (CM_NumClusters()+31)>>5;

	// convert leafs to clusters
	for (i=0 ; i<count ; i++)
		leafs[i] = CM_LeafCluster(leafs[i]);

	memcpy (fatpvs, CM_ClusterPVS(leafs[0]), longs<<2);
	// or in all the other leaf bits
	for (i=1 ; i<count ; i++)
	{
		for (j=0 ; j<i ; j++)
			if (leafs[i] == leafs[j])
				break;
		if (j != i)
			continue;		// already have the cluster we want
		src = CM_ClusterPVS(leafs[i]);
		for (j=0 ; j<longs ; j++)
			((long *)fatpvs)[j] |= ((long *)src)[j];
	}
}
/*
============
SV_FatPVS

The client will interpolate the view position,
so we can't use a single PVS point
===========
*/
SV_FatPVS
The client will interpolate the view position,
so we can't use a single PVS point
SV_FatPVS The client will interpolate the view position so we can ' t use a single PVS point
void SV_FatPVS (vec3_t org)
{
	int		leafs[64];
	int		i, j, count;
	int		longs;
	byte	*src;
	vec3_t	mins, maxs;
	for (i=0 ; i<3 ; i++)
	{
		mins[i] = org[i] - 8;
		maxs[i] = org[i] + 8;
	}
	count = CM_BoxLeafnums (mins, maxs, leafs, 64, NULL);
	if (count < 1)
		Com_Error (ERR_FATAL, "SV_FatPVS: count < 1");
	longs = (CM_NumClusters()+31)>>5;
	for (i=0 ; i<count ; i++)
		leafs[i] = CM_LeafCluster(leafs[i]);
	memcpy (fatpvs, CM_ClusterPVS(leafs[0]), longs<<2);
	for (i=1 ; i<count ; i++)
	{
		for (j=0 ; j<i ; j++)
			if (leafs[i] == leafs[j])
				break;
		if (j != i)
			continue;		
		src = CM_ClusterPVS(leafs[i]);
		for (j=0 ; j<longs ; j++)
			((long *)fatpvs)[j] |= ((long *)src)[j];
	}
}
void SV_FatPVS ( vec3_t org ) { int leafs [ 64 ] ; int i , j , count ; int longs ; byte * src ; vec3_t mins , maxs ; for ( i = 0 ; i < 3 ; i ++ ) { mins [ i ] = org [ i ] - 8 ; maxs [ i ] = org [ i ] + 8 ; } count = CM_BoxLeafnums ( mins , maxs , leafs , 64 , NULL ) ; if ( count < 1 ) Com_Error ( ERR_FATAL , " " ) ; longs = ( CM_NumClusters ( ) + 31 ) >> 5 ; for ( i = 0 ; i < count ; i ++ ) leafs [ i ] = CM_LeafCluster ( leafs [ i ] ) ; memcpy ( fatpvs , CM_ClusterPVS ( leafs [ 0 ] ) , longs << 2 ) ; for ( i = 1 ; i < count ; i ++ ) { for ( j = 0 ; j < i ; j ++ ) if ( leafs [ i ] == leafs [ j ] ) break ; if ( j != i ) continue ; src = CM_ClusterPVS ( leafs [ i ] ) ; for ( j = 0 ; j < longs ; j ++ ) ( ( long * ) fatpvs ) [ j ] |= ( ( long * ) src ) [ j ] ; } }
SV_FatPVS
The client will interpolate the view position,
so we can't use a single PVS point
SV_FatPVS The client will interpolate the view position so we can ' t use a single PVS point
// convert leafs to clusters // or in all the other leaf bits // already have the cluster we want