From f8bc2abd2b10aa5062f72d2a5bc0b1b8cca2ea38 Mon Sep 17 00:00:00 2001 From: Vaqtincha Date: Tue, 9 Apr 2024 15:49:24 +0500 Subject: [PATCH] don't send radio message to teammate (if freeforall 1) --- regamedll/dlls/player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regamedll/dlls/player.cpp b/regamedll/dlls/player.cpp index 63ea1d060..ea9fb86a9 100644 --- a/regamedll/dlls/player.cpp +++ b/regamedll/dlls/player.cpp @@ -382,7 +382,7 @@ void EXT_FUNC CBasePlayer::__API_HOOK(Radio)(const char *msg_id, const char *msg continue; // 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; } // 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)) 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; }