当前位置: 首页>>代码示例>>C++>>正文


C++ EHANDLE::SetTransmit方法代码示例

本文整理汇总了C++中EHANDLE::SetTransmit方法的典型用法代码示例。如果您正苦于以下问题:C++ EHANDLE::SetTransmit方法的具体用法?C++ EHANDLE::SetTransmit怎么用?C++ EHANDLE::SetTransmit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EHANDLE的用法示例。


在下文中一共展示了EHANDLE::SetTransmit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetTransmit

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CPointCommentaryNode::SetTransmit( CCheckTransmitInfo *pInfo, bool bAlways )
{
	// Are we already marked for transmission?
	if ( pInfo->m_pTransmitEdict->Get( entindex() ) )
		return;

	BaseClass::SetTransmit( pInfo, bAlways );

	// Force our camera view position entity to be sent
	if ( m_hViewTarget )
	{
		m_hViewTarget->SetTransmit( pInfo, bAlways );
	}
	if ( m_hViewPosition.Get() )
	{
		m_hViewPosition.Get()->SetTransmit( pInfo, bAlways );
	}
	if ( m_hViewPositionMover )
	{
		m_hViewPositionMover->SetTransmit( pInfo, bAlways );
	}
}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:25,代码来源:commentarysystem.cpp

示例2: SetTransmit

//-----------------------------------------------------------------------------
// Rules about which entities need to transmit along with me
//-----------------------------------------------------------------------------
void CAmbientGeneric::SetTransmit( CCheckTransmitInfo *pInfo, bool bAlways )
{
	// Ambient generics never transmit; this is just a way for us to ensure
	// the sound source gets transmitted; that's why we don't call pInfo->m_pTransmitEdict->Set
	if ( !m_hSoundSource || m_hSoundSource == this || !m_fActive )
		return;

	// Don't bother sending the position of the source if we have to play everywhere
	if ( FBitSet( m_spawnflags, SF_AMBIENT_SOUND_EVERYWHERE ) )
		return;

	Assert( pInfo->m_pClientEnt );
	CBaseEntity *pClient = (CBaseEntity*)(pInfo->m_pClientEnt->GetUnknown());
	if ( !pClient )
		return;

	// Send the sound source if he's close enough
	if ( ( m_flMaxRadius < 0 ) || ( pClient->GetAbsOrigin().DistToSqr( m_hSoundSource->GetAbsOrigin() ) <= m_flMaxRadius * m_flMaxRadius ) )
	{
		m_hSoundSource->SetTransmit( pInfo, false );
	}
}
开发者ID:Rayman1103,项目名称:HLComplete,代码行数:25,代码来源:sound.cpp


注:本文中的EHANDLE::SetTransmit方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。