native

CheckVisibilityInOrigin

Syntax

native CheckVisibilityInOrigin(const ent, Float:origin[3], CheckVisibilityType:type = VisibilityInPVS);

Description

Test visibility of an entity from a given origin using either PVS or PAS

Parameters

entity Entity index
origin Vector representing the origin from which visibility is checked
type Type of visibility check: VisibilityInPVS (Potentially Visible Set) or VisibilityInPAS (Potentially Audible Set)

Return

0 - Not visible
1 - Visible, passed by a leafnum
2 - Visible, passed by a headnode

Remarks

This function checks the visibility of the specified entity from the given origin, using either
the Potentially Visible Set (PVS) or the Potentially Audible Set (PAS) depending on the provided type