Add TE_SendToAllInRange

Add helper stock to mimic PVS and PAS recipient filters for tempents in
the SDK.
This commit is contained in:
Peace-Maker 2015-03-03 17:22:01 +01:00
parent b43da7b7f0
commit b53947ccc3

View File

@ -226,3 +226,21 @@ stock TE_SendToClient(client, Float:delay=0.0)
return TE_Send(players, 1, delay);
}
/**
* Sends the current TE to all clients that are in
* visible or audible range of the origin.
* @note See TE_Start().
* @note See GetClientsInRange()
*
* @param origin Coordinates from which to test range.
* @param rangeType Range type to use for filtering clients.
* @param delay Delay in seconds to send the TE.
* @noreturn
*/
stock TE_SendToAllInRange(float origin[3], ClientRangeType rangeType, float delay=0.0)
{
int[] clients = new int[MaxClients];
int total = GetClientsInRange(origin, rangeType, clients, MaxClients);
return TE_Send(clients, total, delay);
}