View Single Post
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 10-16-2009 , 20:19   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #104

Fakemeta function :
Code:
EngFunc_FindClientInPVS

Description :
Return the next "player" entity in someone PVS using a global loop.


Usage :
Code:
iEnt2 = engfunc(EngFunc_FindClientInPVS, iEnt);

Parameters
iEnt = Source entity. Seek someone within of iEnt PVS

Unlike EngFunc_EntitiesInPVS, it does not return a series of chained entities.

It works like a global loop of entities.
No matter which source entity you use, this function maintains the last index used and returns the next entity in source entity PVS.

This function must be called severals times to find every entity in PVS and also can return the source entity but it can't be called twice inside the same function because it will return the same entity.
Notes :
It seems you can call this function once between some forward (maybe UpdateClientData, Think, AddToFullPack or some other).

It's not clear the main purpose of this function because you can get similar results with FindEntitiesInPVS.
CheckVisibility and FindEntitiesInPVS are better functions to use.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 10-17-2009 at 15:17.
joropito is offline
Send a message via MSN to joropito