本文整理汇总了C++中SetTransmitState函数的典型用法代码示例。如果您正苦于以下问题:C++ SetTransmitState函数的具体用法?C++ SetTransmitState怎么用?C++ SetTransmitState使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetTransmitState函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetTransmitState
//-------------------------------------------------------------------------------------
// Purpose : Send even though we don't have a model so spotlight gets proper position
// Input :
// Output :
//-------------------------------------------------------------------------------------
int CPointSpotlight::UpdateTransmitState()
{
if ( m_bEfficientSpotlight )
return SetTransmitState( FL_EDICT_DONTSEND );
return SetTransmitState( FL_EDICT_PVSCHECK );
}
示例2: SetTransmitState
// Smoke grenade particles should always transmitted to clients. If not, a client who
// enters the PVS late will see the smoke start billowing from then, allowing better vision.
int ParticleSmokeGrenade::UpdateTransmitState( void )
{
if ( IsEffectActive( EF_NODRAW ) )
return SetTransmitState( FL_EDICT_DONTSEND );
return SetTransmitState( FL_EDICT_ALWAYS );
}
示例3: SetTransmitState
int CRotorWashEmitter::UpdateTransmitState( void )
{
if ( GetParent() )
{
return SetTransmitState( FL_EDICT_FULLCHECK );
}
return SetTransmitState( FL_EDICT_PVSCHECK );
}
示例4: SetTransmitState
int CBaseViewModel::UpdateTransmitState()
{
if ( IsEffectActive( EF_NODRAW ) )
{
return SetTransmitState( FL_EDICT_DONTSEND );
}
return SetTransmitState( FL_EDICT_FULLCHECK );
}
示例5: SetTransmitState
int CTeamTrainWatcher::UpdateTransmitState()
{
if ( m_bDisabled )
{
return SetTransmitState( FL_EDICT_DONTSEND );
}
return SetTransmitState( FL_EDICT_ALWAYS );
}
示例6: SetTransmitState
//-----------------------------------------------------------------------------
// Purpose: Since the control zone is a data only class, force it to always be sent ( shouldn't change often so )
// bandwidth usage should be small.
// Input : **ppSendTable -
// *recipient -
// *pvs -
// clientArea -
// Output : Returns true on success, false on failure.
//-----------------------------------------------------------------------------
int CControlZone::UpdateTransmitState()
{
if ( IsEffectActive( EF_NODRAW ) )
{
return SetTransmitState( FL_EDICT_DONTSEND );
}
else
{
return SetTransmitState( FL_EDICT_ALWAYS );
}
}
示例7: SetTransmitState
int CBaseParticleEntity::UpdateTransmitState( void )
{
if ( IsEffectActive( EF_NODRAW ) )
return SetTransmitState( FL_EDICT_DONTSEND );
if ( IsEFlagSet( EFL_IN_SKYBOX ) )
return SetTransmitState( FL_EDICT_ALWAYS );
// cull against PVS
return SetTransmitState( FL_EDICT_PVSCHECK );
}
示例8: SetTransmitState
int CASW_Broadcast_Camera::UpdateTransmitState()
{
// always tranmit if currently used by a monitor
if ( m_state == USE_ON )
{
return SetTransmitState( FL_EDICT_ALWAYS );
}
else
{
return SetTransmitState( FL_EDICT_DONTSEND );
}
}
示例9: SetTransmitState
//-----------------------------------------------------------------------------
// Should we transmit it to the client?
//-----------------------------------------------------------------------------
int CEnvParticleScript::UpdateTransmitState()
{
if ( IsEffectActive( EF_NODRAW ) )
{
return SetTransmitState( FL_EDICT_DONTSEND );
}
if ( IsEFlagSet( EFL_IN_SKYBOX ) )
{
return SetTransmitState( FL_EDICT_ALWAYS );
}
return SetTransmitState( FL_EDICT_PVSCHECK );
}
示例10: SetTransmitState
//-----------------------------------------------------------------------------
// Purpose: Always transmitted to clients
//-----------------------------------------------------------------------------
int CInfoTarget::UpdateTransmitState()
{
// Spawn flags 2 means we always transmit
if ( HasSpawnFlags(0x02) )
return SetTransmitState( FL_EDICT_ALWAYS );
return BaseClass::UpdateTransmitState();
}
示例11: SetTransmitState
int CRopeKeyframe::UpdateTransmitState()
{
// Certain entities like sprites and ropes are strewn throughout the level and they rarely change.
// For these entities, it's more efficient to transmit them once and then always leave them on
// the client. Otherwise, the server will have to send big bursts of data with the entity states
// as they come in and out of the PVS.
return SetTransmitState( FL_EDICT_ALWAYS );
}
示例12: SetTransmitState
int CBeam::UpdateTransmitState( void )
{
// we must call ShouldTransmit() if we have a move parent
if ( GetMoveParent() )
return SetTransmitState( FL_EDICT_FULLCHECK );
return BaseClass::UpdateTransmitState( );
}
示例13: SetTransmitState
int CCitadelEnergyCore::UpdateTransmitState( void )
{
if ( IsViewModelMoveParent( this ) )
{
return SetTransmitState( FL_EDICT_FULLCHECK );
}
return BaseClass::UpdateTransmitState();
}
示例14: SetTransmitState
//-----------------------------------------------------------------------------
// Purpose: Screens attached to view models only go to client if viewmodel is being sent, too.
// Input : *recipient -
// *pvs -
// clientArea -
// Output : Returns true on success, false on failure.
//-----------------------------------------------------------------------------
int CVGuiScreen::UpdateTransmitState()
{
if ( IsAttachedToViewModel() )
{
// only send to the owner, or someone spectating the owner.
return SetTransmitState( FL_EDICT_FULLCHECK );
}
else if ( GetMoveParent() )
{
// Let the parent object trigger the send. This is more efficient than having it call CBaseEntity::ShouldTransmit
// for all the vgui screens in the map.
return SetTransmitState( FL_EDICT_PVSCHECK );
}
else
{
return BaseClass::UpdateTransmitState();
}
}
示例15: SetTransmitState
//--------------------------------------------------------------------------------------------------------------
int CEnvDetailController::UpdateTransmitState()
{
#ifndef CLIENT_DLL
// ALWAYS transmit to all clients.
return SetTransmitState( FL_EDICT_ALWAYS );
#else
return 0;
#endif
}