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


C++ IsEffectActive函数代码示例

本文整理汇总了C++中IsEffectActive函数的典型用法代码示例。如果您正苦于以下问题:C++ IsEffectActive函数的具体用法?C++ IsEffectActive怎么用?C++ IsEffectActive使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: return

//-----------------------------------------------------------------------------
// Purpose: check if weapon viewmodel should be drawn
//-----------------------------------------------------------------------------
bool C_BaseViewModel::ShouldDraw()
{
	if ( g_bEngineIsHLTV )
	{
		return ( HLTVCamera()->GetMode() == OBS_MODE_IN_EYE &&
				 HLTVCamera()->GetPrimaryTarget() == GetOwner()	);
	}
#if defined( REPLAY_ENABLED )
	else if ( engine->IsReplay() )
	{
		return ( ReplayCamera()->GetMode() == OBS_MODE_IN_EYE &&
				 ReplayCamera()->GetPrimaryTarget() == GetOwner() );
	}
#endif
	else
	{
		Assert( !IsEffectActive( EF_NODRAW ) );
		Assert(	GetRenderMode() != kRenderNone );

		if ( vm_draw_always.GetBool() )
			return true;
		if ( GetOwner() != C_BasePlayer::GetLocalPlayer() )
			return false;

		return BaseClass::ShouldDraw();
	}
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:30,代码来源:c_baseviewmodel.cpp

示例2: IsEffectActive

// Alien Swarm weapons use custom bone merge cache so they can pitch the guns up slightly
void C_ASW_Weapon::CalcBoneMerge( CStudioHdr *hdr, int boneMask, CBoneBitList &boneComputed )
{
	// For EF_BONEMERGE entities, copy the bone matrices for any bones that have matching names.
	bool boneMerge = IsEffectActive(EF_BONEMERGE);
	if ( boneMerge || m_pBoneMergeCache )
	{
		if ( boneMerge )
		{
			if ( !m_pBoneMergeCache )
			{
				m_pBoneMergeCache = new CASW_Bone_Merge_Cache;
				m_pBoneMergeCache->Init( this );
			}
			CASW_Bone_Merge_Cache *pASWBoneMergeCache = static_cast<CASW_Bone_Merge_Cache*>( m_pBoneMergeCache );
			pASWBoneMergeCache->MergeMatchingBones( boneMask, boneComputed, ShouldAlignWeaponToLaserPointer(), m_vecLaserPointerDirection );

			int iAttachment = GetMuzzleAttachment();
			if ( iAttachment > 0 && m_pLaserPointerEffect )
			{
				Vector vecOrigin;
				QAngle angWeapon;
				GetAttachment( iAttachment, vecOrigin, angWeapon );
				m_pLaserPointerEffect->SetControlPoint( 1, vecOrigin );
			}
		}
		else
		{
			delete m_pBoneMergeCache;
			m_pBoneMergeCache = NULL;
		}
	}
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:33,代码来源:asw_bone_merge.cpp

示例3: UpdateTransmitState

// 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 );
}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:9,代码来源:particle_smokegrenade.cpp

示例4: ShadowCastType

//IOS Added from HLCoders:
ShadowType_t C_SDKPlayer::ShadowCastType( void )
 {
	 if ( !IsVisible() || IsEffectActive(EF_NODRAW | EF_NOSHADOW) )
		return SHADOWS_NONE;
	else
		return SHADOWS_RENDER_TO_TEXTURE_DYNAMIC;
}
开发者ID:iosoccer,项目名称:iosoccer-game,代码行数:8,代码来源:c_sdk_player.cpp

示例5: GetSolidFlags

void CWeaponHL2MPBase::Materialize( void )
{
	if ( IsEffectActive( EF_NODRAW ) )
	{
		// changing from invisible state to visible.
		EmitSound( "AlyxEmp.Charge" );
		
		RemoveEffects( EF_NODRAW );
		DoMuzzleFlash();
	}

	if ( HasSpawnFlags( SF_NORESPAWN ) == false )
	{
		VPhysicsInitNormal( SOLID_BBOX, GetSolidFlags() | FSOLID_TRIGGER, false );
		SetMoveType( MOVETYPE_VPHYSICS );

		HL2MPRules()->AddLevelDesignerPlacedObject( this );
	}

	if ( HasSpawnFlags( SF_NORESPAWN ) == false )
	{
		if ( GetOriginalSpawnOrigin() == vec3_origin )
		{
			m_vOriginalSpawnOrigin = GetAbsOrigin();
			m_vOriginalSpawnAngles = GetAbsAngles();
		}
	}

	SetPickupTouch();

	SetThink (NULL);
}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:32,代码来源:weapon_hl2mpbase.cpp

示例6: Materialize

//====================================================================================
// WEAPON SPAWNING
//====================================================================================
//-----------------------------------------------------------------------------
// Purpose: Make a weapon visible and tangible
//-----------------------------------------------------------------------------// 
void CBaseCombatWeapon::Materialize( void )
{
	if ( IsEffectActive( EF_NODRAW ) )
	{
		// changing from invisible state to visible.
#ifdef HL2MP
		EmitSound( "AlyxEmp.Charge" );
#else
		EmitSound( "BaseCombatWeapon.WeaponMaterialize" );
#endif
		
		RemoveEffects( EF_NODRAW );
		DoMuzzleFlash();
	}
#ifdef HL2MP
	if ( HasSpawnFlags( SF_NORESPAWN ) == false )
	{
		VPhysicsInitNormal( SOLID_BBOX, GetSolidFlags() | FSOLID_TRIGGER, false );
		SetMoveType( MOVETYPE_VPHYSICS );

		HL2MPRules()->AddLevelDesignerPlacedObject( this );
	}
#else
	SetSolid( SOLID_BBOX );
	AddSolidFlags( FSOLID_TRIGGER );
#endif

	SetPickupTouch();

	SetThink (NULL);
}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:37,代码来源:basecombatweapon.cpp

示例7: UpdateFireEmitters

void C_ASW_Buzzer::UpdateFireEmitters()
{
	bool bOnFire = (m_bOnFire && !IsEffectActive(EF_NODRAW));
	if (bOnFire != m_bClientOnFire)
	{
		m_bClientOnFire = bOnFire;
		if (m_bClientOnFire)
		{
			if ( !m_pBurningEffect )
			{
				m_pBurningEffect = UTIL_ASW_CreateFireEffect( this );
			}
			EmitSound( "ASWFire.BurningFlesh" );
		}
		else
		{
			if ( m_pBurningEffect )
			{
				ParticleProp()->StopEmission( m_pBurningEffect );
				m_pBurningEffect = NULL;
			}
			StopSound("ASWFire.BurningFlesh");
			if ( C_BaseEntity::IsAbsQueriesValid() )
				EmitSound("ASWFire.StopBurning");
		}
	}
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:27,代码来源:c_asw_buzzer.cpp

示例8: Simulate

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void C_EntityFlame::Simulate( void )
{
	if ( gpGlobals->frametime <= 0.0f )
		return;

	if ( IsEffectActive(EF_BRIGHTLIGHT) || IsEffectActive(EF_DIMLIGHT) )
	{
		dlight_t *dl = effects->CL_AllocDlight ( index );
		dl->origin = GetAbsOrigin();
 		dl->origin[2] += 16;
		dl->color.r = 254;
		dl->color.g = 174;
		dl->color.b = 10;
		dl->radius = random->RandomFloat(400,431);
		dl->die = gpGlobals->curtime + 0.001;
	}
}
开发者ID:TalonBraveInfo,项目名称:InvasionSource,代码行数:20,代码来源:c_fire_smoke.cpp

示例9: AddEntity

//-----------------------------------------------------------------------------
// Purpose: Add entity to visible view models list
//-----------------------------------------------------------------------------
void C_BaseViewModel::AddEntity( void )
{
	// Server says don't interpolate this frame, so set previous info to new info.
	if ( IsEffectActive(EF_NOINTERP) )
	{
		ResetLatched();
	}
}
开发者ID:0xFEEDC0DE64,项目名称:UltraGame,代码行数:11,代码来源:c_baseviewmodel.cpp

示例10: return

bool C_BaseObject::WasLastPlacementPosValid( void )
{
	if ( MustBeBuiltOnAttachmentPoint() )
	{
		return ( !IsEffectActive(EF_NODRAW) );
	}
	
	return ( m_iLastPlacementPosValid > 0 );
}
开发者ID:Deathreus,项目名称:TF2Classic,代码行数:9,代码来源:c_baseobject.cpp

示例11: UpdateTransmitState

              int CBaseViewModel::UpdateTransmitState()
{
    if ( IsEffectActive( EF_NODRAW ) )
    {
        return SetTransmitState( FL_EDICT_DONTSEND );
    }

    return SetTransmitState( FL_EDICT_FULLCHECK );
}
开发者ID:steadyfield,项目名称:SourceEngine2007,代码行数:9,代码来源:baseviewmodel.cpp

示例12: ShouldDraw

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
bool CSniperDot::ShouldDraw( void )			
{
	if ( IsEffectActive( EF_NODRAW ) )
		return false;

	// Don't draw the sniper dot when in thirdperson.
	if ( ::input->CAM_IsThirdPerson() )
		return false;

	return true;
}
开发者ID:staticfox,项目名称:TF2Classic,代码行数:14,代码来源:tf_weapon_sniperrifle.cpp

示例13: UpdateTransmitState

//-----------------------------------------------------------------------------
// 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 );
	}
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:20,代码来源:controlzone.cpp

示例14: UpdateTransmitState

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 );
}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:11,代码来源:baseparticleentity.cpp

示例15: Materialize

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTFPowerup::Materialize( void )
{
	if ( !m_bDisabled && IsEffectActive( EF_NODRAW ) )
	{
		// changing from invisible state to visible.
		EmitSound( "Item.Materialize" );
		RemoveEffects( EF_NODRAW );
	}

	m_bRespawning = false;
	SetTouch( &CItem::ItemTouch );
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:15,代码来源:tf_powerup.cpp


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