mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-28 15:45:46 +03:00
SV_EmitSound2: check player to fakeclient and active. Closes s1lentq/reapi#137
This commit is contained in:
parent
b4ddf0bbd3
commit
0c28b707a0
@ -583,12 +583,16 @@ bool EXT_FUNC SV_EmitSound2_internal(edict_t *entity, IGameClient *pReceiver, in
|
||||
{
|
||||
SV_Multicast(entity, origin, msg_destination | MSG_FL_BROADCAST, TRUE);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
sizebuf_t *pBuffer;
|
||||
client_t *receiver = pReceiver->GetClient();
|
||||
|
||||
if (receiver->fakeclient || (!receiver->connected && !receiver->active && !receiver->spawned))
|
||||
return false;
|
||||
|
||||
if (bSendPAS && receiver->edict != entity) // if the sound for myself, then do not check PAS.
|
||||
{
|
||||
int leafnum = SV_PointLeafnum(origin);
|
||||
|
Loading…
Reference in New Issue
Block a user