Source/ThunderBeast/QuakeToon/server/sv_game.c
qboolean PF_inPVS (vec3_t p1, vec3_t p2)
{
	int		leafnum;
	int		cluster;
	int		area1, area2;
	byte	*mask;

	leafnum = CM_PointLeafnum (p1);
	cluster = CM_LeafCluster (leafnum);
	area1 = CM_LeafArea (leafnum);
	mask = CM_ClusterPVS (cluster);

	leafnum = CM_PointLeafnum (p2);
	cluster = CM_LeafCluster (leafnum);
	area2 = CM_LeafArea (leafnum);
	if ( mask && (!(mask[cluster>>3] & (1<<(cluster&7)) ) ) )
		return false;
	if (!CM_AreasConnected (area1, area2))
		return false;		// a door blocks sight
	return true;
}
/*
=================
PF_inPVS

Also checks portalareas so that doors block sight
=================
*/
PF_inPVS
Also checks portalareas so that doors block sight
PF_inPVS Also checks portalareas so that doors block sight
qboolean PF_inPVS (vec3_t p1, vec3_t p2)
{
	int		leafnum;
	int		cluster;
	int		area1, area2;
	byte	*mask;
	leafnum = CM_PointLeafnum (p1);
	cluster = CM_LeafCluster (leafnum);
	area1 = CM_LeafArea (leafnum);
	mask = CM_ClusterPVS (cluster);
	leafnum = CM_PointLeafnum (p2);
	cluster = CM_LeafCluster (leafnum);
	area2 = CM_LeafArea (leafnum);
	if ( mask && (!(mask[cluster>>3] & (1<<(cluster&7)) ) ) )
		return false;
	if (!CM_AreasConnected (area1, area2))
		return false;		
	return true;
}
qboolean PF_inPVS ( vec3_t p1 , vec3_t p2 ) { int leafnum ; int cluster ; int area1 , area2 ; byte * mask ; leafnum = CM_PointLeafnum ( p1 ) ; cluster = CM_LeafCluster ( leafnum ) ; area1 = CM_LeafArea ( leafnum ) ; mask = CM_ClusterPVS ( cluster ) ; leafnum = CM_PointLeafnum ( p2 ) ; cluster = CM_LeafCluster ( leafnum ) ; area2 = CM_LeafArea ( leafnum ) ; if ( mask && ( ! ( mask [ cluster >> 3 ] & ( 1 << ( cluster & 7 ) ) ) ) ) return false ; if ( ! CM_AreasConnected ( area1 , area2 ) ) return false ; return true ; }
PF_inPVS
Also checks portalareas so that doors block sight
PF_inPVS Also checks portalareas so that doors block sight
// a door blocks sight