本文整理汇总了C++中CClientPlayer::SetPlayerVoice方法的典型用法代码示例。如果您正苦于以下问题:C++ CClientPlayer::SetPlayerVoice方法的具体用法?C++ CClientPlayer::SetPlayerVoice怎么用?C++ CClientPlayer::SetPlayerVoice使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CClientPlayer
的用法示例。
在下文中一共展示了CClientPlayer::SetPlayerVoice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ClassInit
CClientPlayer::CClientPlayer ( CClientManager* pManager, ElementID ID, bool bIsLocalPlayer ) : ClassInit ( this ), CClientPed ( pManager, 0, ID, bIsLocalPlayer )
{
// Initialize
m_pManager = pManager;
m_bIsLocalPlayer = bIsLocalPlayer;
SetTypeName ( "player" );
m_bNametagColorOverridden = false;
m_uiPing = 0;
m_usLatency = 0;
m_uiPlayerSyncCount = 0;
m_uiKeySyncCount = 0;
m_uiVehicleSyncCount = 0;
m_ulLastPuresyncTime = 0;
m_bHasConnectionTrouble = false;
m_bForce = false;
m_bDoExtrapolatingAim = false;
m_bNetworkDead = false;
m_voice = NULL;
// If it's the local player, add the model
if ( m_bIsLocalPlayer )
{
// Set us as the local player in the player manager
if ( !pManager->GetPlayerManager ()->GetLocalPlayer () )
{
pManager->GetPlayerManager ()->SetLocalPlayer ( this );
}
CClientPlayer * pLocalPlayer = this;
// Enable voice playback for local player
if ( pLocalPlayer->GetVoice() == NULL )
{
//If voice is enabled
CClientPlayerVoice * pVoice = new CClientPlayerVoice ( this, g_pClientGame->GetVoiceRecorder() );
pLocalPlayer->SetPlayerVoice ( pVoice );
}
}
else
{
// Enable weapon processing for players
m_remoteDataStorage->SetProcessPlayerWeapon ( true );
// Enable voice playback for remote players
if ( g_pClientGame->GetVoiceRecorder()->IsEnabled() ) //If voice is enabled
m_voice = new CClientPlayerVoice ( this, g_pClientGame->GetVoiceRecorder() );
}
// Set all our default stats
m_pTeam = NULL;
m_bNametagShowing = true;
m_ucNametagColorR = 255;
m_ucNametagColorG = 255;
m_ucNametagColorB = 255;
m_ulLastNametagShow = 0;
SetNametagText ( m_strNick );
// Add us to the player list
m_pManager->GetPlayerManager ()->AddToList ( this );
#ifdef MTA_DEBUG
m_bShowingWepdata = false;
#endif
m_LastPuresyncType = PURESYNC_TYPE_NONE;
}