Skip to content

Commit

Permalink
don't send radio message to teammate (if freeforall 1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaqtincha committed Apr 9, 2024
1 parent f24cccf commit f8bc2ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions regamedll/dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand Down

0 comments on commit f8bc2ab

Please sign in to comment.