Added extra param to is_in_viewcone to switch between a 2D and 3D calculation

Neither is still as accurate as I want them to be though :\
This commit is contained in:
Scott Ehlert
2006-10-01 06:08:39 +00:00
parent 90f11b52bc
commit 39d5ea94fb
2 changed files with 26 additions and 13 deletions

View File

@ -226,8 +226,10 @@ forward pfn_spawn(entid);
*/
native find_sphere_class(aroundent, _lookforclassname[], Float:radius, entlist[], maxents, Float:origin[3] = {0.0, 0.0, 0.0});
//SDK function - checks if an origin is in an entity's view cone
native is_in_viewcone(entity, Float:origin[3]);
/* SDK function - checks if an origin is in an entity's view cone
* Set use3d to 1 to do the calculation in 3D. Otherwise it will be in 2D.
*/
native is_in_viewcone(entity, Float:origin[3], use3d = 0);
//SDK function - checks if an entity is visible to an entity
native is_visible(entity, target);