mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-05-16 08:38:06 +03:00
Ignorerad command small optimization (#481)
This commit is contained in:
parent
1f615d36b5
commit
7b0dab916d
@ -372,6 +372,10 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Radio)(const char *msg_id, const char *msg
|
||||
if (!pPlayer)
|
||||
continue;
|
||||
|
||||
// ignorerad command
|
||||
if (pPlayer->m_bIgnoreRadio)
|
||||
continue;
|
||||
|
||||
// are we a regular player? (not spectator)
|
||||
if (pPlayer->IsPlayer())
|
||||
{
|
||||
@ -400,9 +404,6 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Radio)(const char *msg_id, const char *msg
|
||||
}
|
||||
|
||||
if (bSend)
|
||||
{
|
||||
// ignorerad command
|
||||
if (!pPlayer->m_bIgnoreRadio)
|
||||
{
|
||||
MESSAGE_BEGIN(MSG_ONE, gmsgSendAudio, nullptr, pEntity->pev);
|
||||
WRITE_BYTE(ENTINDEX(edict()));
|
||||
@ -453,7 +454,6 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Radio)(const char *msg_id, const char *msg
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CBasePlayer::SmartRadio()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user