AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Accessing PVS?! Searching for something like is_ent_in_pvs(ent,Float:origin[3]) (https://forums.alliedmods.net/showthread.php?t=49607)

-mE- 01-08-2007 14:37

Accessing PVS?! Searching for something like is_ent_in_pvs(ent,Float:origin[3])
 
Is there a way to access entities within the PVS of another entity or origin? A closer look at the HLSDK didn't actually reveal more than these engfuncs also seen in fakemeta:
Code:

        EngFunc_FindClientInPVS,                        // edict)                        (edict_t *pEdict);
        EngFunc_EntitiesInPVS,                                // edict)                        (edict_t *pplayer);

Is there any way to get a function like
Code:

bool:is_ent_in_pvs(ent,Float:origin[3]) or
bbol:is_ent_in_pvs(ent,id)

or alternatively similar to find_ent_by_class(), etc.?
Code:

ent = find_ent_in_pvs(ent,Float:origin[3]) or
ent = find_ent_in_pvs(ent,id)

I'm in need of this for a structure limiter for Natural Selection, which would basically make sure there's no more than X entities in the PVS of each newly spawned entity.
This would significantly improve the performance when eg. a custom entity has to think and thus runs a rather extensive check on all entities in line of sight, as most would be filtered out anyway.
Also this would give more control over sending messages just to certain players in PVS as opposed to using MSG_PVS.

VEN 01-08-2007 14:49

Re: Accessing PVS?! Searching for something like is_ent_in_pvs(ent,Float:origin[3])
 
AFAIK here is nothing you can do since there are no "*PVS* from origin" HL Engine functions.


All times are GMT -4. The time now is 22:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.