Is this what you mean?
byte pvs[ MAX_MAP_CLUSTERS/8 ];
int iPVSCluster = g_pEngine-GetClusterForOrigin(start);
int iPVSLength = g_pEngine-GetPVSForCluster(iPVSCluster, sizeof(pvs), pvs);
g_pEngine-CheckOriginInPVS(end, pvs, iPVSLength));
J
On 5/31/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
What would be the most efficient way to get all enemies within direct LOS?
My thoughts as of now:
1. Get a list of entities within PVS with UTIL_EntitiesInPVS()
2. Filter list for hostile player entities.
3. UTIL_Trace[something] to each. (Which 'something' is best?)
Thanks.
-JS
]
To: hlcoders@list.valvesoftware.com
Sent: Tuesday, May 31, 2005 3:24 PM
Subject: [hlcoders] Enemies within LOS
What would be the most efficient way to get all enemies within direct LOS?
My thoughts as of now:
1. Get a list of entities within PVS with UTIL_EntitiesInPVS()
2. Filter list
1. Get a list of entities within PVS with UTIL_EntitiesInPVS()
2. Filter list for hostile player entities.
3. UTIL_Trace[something] to each. (Which 'something' is best?)
I've thought about and slightly modified the procedure.
1. Get a list of enemy players from the CTeam entity.
2.
4 matches
Mail list logo