game_shared/voice_gamemgr.cpp
131415161718
#include "player.h"
#include "ivoiceserver.h"
#include "usermessages.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
13141516171819
#include "player.h"
#include "ivoiceserver.h"
#include "usermessages.h"
#include "ff_player.h" // |-- Mirv: Need channels
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
206207208209210211212
if(!pEnt || !pEnt->IsPlayer())
continue;
CBasePlayer *pPlayer = (CBasePlayer*)pEnt;
CSingleUserRecipientFilter user( pPlayer );
207208209210211212213214215216
if(!pEnt || !pEnt->IsPlayer())
continue;
// --> Mirv: Need different cast
//CBasePlayer *pPlayer = (CBasePlayer*)pEnt;
CFFPlayer *pPlayer = (CFFPlayer *)pEnt;
// <-- Mirv: Need different cast
CSingleUserRecipientFilter user( pPlayer );
226227228229230231232233234
// Build a mask of who they can hear based on the game rules.
for(int iOtherClient=0; iOtherClient < m_nMaxPlayers; iOtherClient++)
{
CBaseEntity *pEnt = UTIL_PlayerByIndex(iOtherClient+1);
if(pEnt && pEnt->IsPlayer() &&
(bAllTalk || m_pHelper->CanPlayerHearPlayer(pPlayer, (CBasePlayer*)pEnt)) )
{
gameRulesMask[iOtherClient] = true;
}
230231232233234235236237238239240241242
// Build a mask of who they can hear based on the game rules.
for(int iOtherClient=0; iOtherClient < m_nMaxPlayers; iOtherClient++)
{
// --> Mirv: Need different cast
//CBaseEntity *pEnt = UTIL_PlayerByIndex(iOtherClient+1);
CFFPlayer *pEnt = (CFFPlayer *)UTIL_PlayerByIndex(iOtherClient+1);
// <-- Mirv: Need different cast
if(pEnt && pEnt->IsPlayer() &&
(bAllTalk || m_pHelper->CanPlayerHearPlayer(pPlayer, (CBasePlayer*)pEnt)) &&
( pPlayer->m_iChannel == pEnt->m_iChannel )) // |-- Mirv: They are in the same v. group
{
gameRulesMask[iOtherClient] = true;
}