mirror of
https://github.com/s1lentq/ReGameDLL_CS.git
synced 2025-02-10 22:08:47 +03:00
don't send radio message to teammate (if freeforall 1) (#958)
* don't send radio message to teammate (if freeforall 1) * don't send message zero length
This commit is contained in:
parent
f24cccfe73
commit
d5eb9c34d2
@ -382,7 +382,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Radio)(const char *msg_id, const char *msg
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// is this player on our team? (even dead players hear our radio calls)
|
// is this player on our team? (even dead players hear our radio calls)
|
||||||
if (pPlayer->m_iTeam == m_iTeam)
|
if (g_pGameRules->PlayerRelationship(this, pPlayer) == GR_TEAMMATE)
|
||||||
bSend = true;
|
bSend = true;
|
||||||
}
|
}
|
||||||
// this means we're a spectator
|
// this means we're a spectator
|
||||||
@ -396,7 +396,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Radio)(const char *msg_id, const char *msg
|
|||||||
if (FNullEnt(pPlayer->m_hObserverTarget))
|
if (FNullEnt(pPlayer->m_hObserverTarget))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (pPlayer->m_hObserverTarget && pPlayer->m_hObserverTarget->m_iTeam == m_iTeam)
|
if (pPlayer->m_hObserverTarget && g_pGameRules->PlayerRelationship(this, pPlayer->m_hObserverTarget) == GR_TEAMMATE)
|
||||||
{
|
{
|
||||||
bSend = true;
|
bSend = true;
|
||||||
}
|
}
|
||||||
@ -411,7 +411,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Radio)(const char *msg_id, const char *msg
|
|||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
|
|
||||||
// radio message icon
|
// radio message icon
|
||||||
if (msg_verbose)
|
if (msg_verbose && msg_verbose[0] != 0)
|
||||||
{
|
{
|
||||||
// search the place name where is located the player
|
// search the place name where is located the player
|
||||||
const char *placeName = nullptr;
|
const char *placeName = nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user