您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ClientEntityList函数代码示例

51自学网 2021-06-01 20:11:24
  C++
这篇教程C++ ClientEntityList函数代码示例写得很实用,希望能帮到您。

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

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

示例1: CheckAutoTransparentProps

void CheckAutoTransparentProps(const Vector &pos, const QAngle &ang){	float opacity = clamp(cl_goal_opacity.GetFloat(), 0.0f, 1.0f);	for (int i = gpGlobals->maxClients; i <= ClientEntityList().GetHighestEntityIndex(); i++)	{		C_BaseEntity *pEnt = ClientEntityList().GetBaseEntity(i);		if(!dynamic_cast<C_AutoTransparentProp *>(pEnt))			continue;		// Check if the camera is behind the goal line and close to the goal. Use an additional offset so the goal post doesn't get in the way.		if (opacity != 1.0f			&& (pos.y <= SDKGameRules()->m_vFieldMin.GetY() + cl_goal_opacity_fieldoffset.GetFloat() && pEnt->GetLocalOrigin().y < SDKGameRules()->m_vKickOff.GetY()				|| pos.y >= SDKGameRules()->m_vFieldMax.GetY() - cl_goal_opacity_fieldoffset.GetFloat() && pEnt->GetLocalOrigin().y > SDKGameRules()->m_vKickOff.GetY())			&& pos.x >= SDKGameRules()->m_vKickOff.GetX() - 500 && pos.x <= SDKGameRules()->m_vKickOff.GetX() + 500)		{			pEnt->SetRenderMode(kRenderTransColor);			pEnt->SetRenderColorA(opacity * 255);		}		else		{			pEnt->SetRenderMode(kRenderNormal);		}	}}
开发者ID:rain2372,项目名称:IOS-1,代码行数:25,


示例2: ClientEntityList

C_BaseEntity* C_AllBaseEntityIterator::Next(){	if ( m_CurBaseEntity == ClientEntityList().m_BaseEntities.InvalidIndex() )		return NULL;	C_BaseEntity *pRet = ClientEntityList().m_BaseEntities[m_CurBaseEntity];	m_CurBaseEntity = ClientEntityList().m_BaseEntities.Next( m_CurBaseEntity );	return pRet;}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:9,


示例3: ResetAutoTransparentProps

void ResetAutoTransparentProps(){	for (int i = gpGlobals->maxClients; i <= ClientEntityList().GetHighestEntityIndex(); i++)	{		C_BaseEntity *pEnt = ClientEntityList().GetBaseEntity(i);		if(!dynamic_cast<C_AutoTransparentProp *>(pEnt))			continue;		pEnt->SetRenderMode(kRenderNormal);	}}
开发者ID:rain2372,项目名称:IOS-1,代码行数:11,


示例4: CheckEntities

//-----------------------------------------------------------------------------// Purpose: Validates existing entities//-----------------------------------------------------------------------------void CheckEntities( PyClientClassBase *pCC, boost::python::object pyClass ){	int iHighest = ClientEntityList().GetHighestEntityIndex();	for ( int i=0; i <= iHighest; i++ )	{		C_BaseEntity *pEnt = ClientEntityList().GetBaseEntity( i );		if ( !pEnt || pEnt->GetClientClass() != pCC || pEnt->GetPyInstance().ptr() == Py_None )			continue;		pEnt->GetPyInstance().attr("__setattr__")("__class__", pyClass);	}}
开发者ID:Sandern,项目名称:py-source-sdk-2013,代码行数:15,


示例5: while

C_BaseEntity* C_BaseEntityIterator::Next(){	// Skip dormant entities	while ( m_CurBaseEntity != ClientEntityList().m_BaseEntities.InvalidIndex() )	{		C_BaseEntity *pRet = ClientEntityList().m_BaseEntities[m_CurBaseEntity];		m_CurBaseEntity = ClientEntityList().m_BaseEntities.Next( m_CurBaseEntity );		if (!pRet->IsDormant())			return pRet;	}	return NULL;}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:14,


示例6: ClientEntityList

void C_HLTVCamera::FixupMovmentParents(){	// Find resource zone		for (	ClientEntityHandle_t e = ClientEntityList().FirstHandle();			e != ClientEntityList().InvalidHandle(); e = ClientEntityList().NextHandle( e ) )	{		C_BaseEntity *ent = C_BaseEntity::Instance( e );		if ( !ent )			continue;		ent->HierarchyUpdateMoveParent();	}}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:15,


示例7: ClientEntityList

void CClientThinkList::PerformThinkFunctions(){	float curtime = gpGlobals->curtime;	unsigned long iNext;	for ( unsigned long iCur=m_ThinkEntries.Head(); iCur != m_ThinkEntries.InvalidIndex(); iCur = iNext )	{		iNext = m_ThinkEntries.Next( iCur );		CThinkEntry *pEntry = &m_ThinkEntries[iCur];				IClientThinkable *pThink = ClientEntityList().GetClientThinkableFromHandle( pEntry->m_hEnt );		if ( pThink )		{			if ( pEntry->m_flNextClientThink == CLIENT_THINK_ALWAYS )			{				// NOTE: The Think function here could call SetNextClientThink				// which would cause it to be removed + readded into the list				pThink->ClientThink();				// NOTE: The Think() call can cause other things to be added to the Think				// list, which could reallocate memory and invalidate the pEntry pointer				pEntry = &m_ThinkEntries[iCur];			}			else if ( pEntry->m_flNextClientThink < curtime )			{				pEntry->m_flNextClientThink = curtime;				// NOTE: The Think function here could call SetNextClientThink				// which would cause it to be readded into the list				pThink->ClientThink();				// NOTE: The Think() call can cause other things to be added to the Think				// list, which could reallocate memory and invalidate the pEntry pointer				pEntry = &m_ThinkEntries[iCur];				// If they haven't changed the think time, then it should be removed.				if ( pEntry->m_flNextClientThink == curtime )				{					RemoveThinkable( pEntry->m_hEnt );				}			}			Assert( pEntry == &m_ThinkEntries[iCur] );			// Set this after the Think calls in case they look at LastClientThink			m_ThinkEntries[iCur].m_flLastClientThink = curtime;		}		else		{			// This should be almost impossible. When ClientEntityHandle_t's are versioned,			// this should be totally impossible.			Assert( false );			m_ThinkEntries.Remove( iCur );		}	}	// Clear out the client-side entity deletion list.	CleanUpDeleteList();}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:60,


示例8: SpotlightCurrentPos

//------------------------------------------------------------------------------void C_BeamSpotLight::SpotlightCreate(void){	m_vSpotlightTargetPos = SpotlightCurrentPos();	{		//C_Beam *beam = CBeam::BeamCreate( "sprites/spotlight.vmt", m_flSpotlightGoalWidth );		C_Beam *beam = C_Beam::BeamCreate( "sprites/glow_test02.vmt", m_flSpotlightGoalWidth );		// Beam only exists client side		ClientEntityList().AddNonNetworkableEntity( beam );		m_hSpotlight = beam;	}	// Set the temporary spawnflag on the beam so it doesn't save (we'll recreate it on restore)	m_hSpotlight->SetHDRColorScale( m_flHDRColorScale );	const color24 c = GetRenderColor();	m_hSpotlight->SetColor( c.r, c.g, c.b ); 	m_hSpotlight->SetHaloTexture(m_nHaloIndex);	m_hSpotlight->SetHaloScale(60);	m_hSpotlight->SetEndWidth(m_flSpotlightGoalWidth);	m_hSpotlight->SetBeamFlags( (FBEAM_SHADEOUT|FBEAM_NOTILE) );	m_hSpotlight->SetBrightness( 64 );	m_hSpotlight->SetNoise( 0 );	m_hSpotlight->PointsInit( GetAbsOrigin(), m_vSpotlightTargetPos );}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:26,


示例9: ClientThinkList

void C_BaseNetworkable::Term(){	// Detach from the server list.	if ( m_ClientHandle != ClientEntityList().InvalidHandle() )	{		// Remove from the think list.		ClientThinkList()->RemoveThinkable( m_ClientHandle );		ClientEntityList().RemoveEntity( GetRefEHandle() );				index = 0xFFFF;				// RemoveEntity should have done this.		Assert( m_ClientHandle == ClientEntityList().InvalidHandle() );	}}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:16,


示例10: Assert

void C_BaseNetworkable::Init( int entnum, int iSerialNum ){	Assert( index == 0xFFFF );	index = entnum;	m_ClientHandle = ClientEntityList().AddNetworkableEntity( GetIClientUnknown(), entnum, iSerialNum );}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:7,


示例11: RemoveThinkable

void CClientThinkList::SetNextClientThink( ClientEntityHandle_t hEnt, float nextTime ){	if ( nextTime == CLIENT_THINK_NEVER )	{		RemoveThinkable( hEnt );	}	else	{		IClientThinkable *pThink = ClientEntityList().GetClientThinkableFromHandle( hEnt );		if ( pThink )		{			ClientThinkHandle_t hThink = pThink->GetThinkHandle();			// Add it to the list if it's not already in there.			if ( hThink == INVALID_THINK_HANDLE )			{				hThink = (ClientThinkHandle_t)m_ThinkEntries.AddToTail();				pThink->SetThinkHandle( hThink );				GetThinkEntry( hThink )->m_hEnt = hEnt;			}			// Set the next think time..			GetThinkEntry( hThink )->m_flNextClientThink = nextTime;		}	}}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:27,


示例12: CalcChaseCamView

void C_HLTVCamera::SetPrimaryTarget( int nEntity ) { 	if ( m_iTraget1 == nEntity )		return;	m_iTraget1 = nEntity;	if ( GetMode() == OBS_MODE_ROAMING )	{		Vector vOrigin;		QAngle aAngles;		float flFov;		CalcChaseCamView( vOrigin,  aAngles, flFov );	}	else if ( GetMode() == OBS_MODE_CHASE )	{		C_BaseEntity* target = ClientEntityList().GetEnt( m_iTraget1 );		if ( target )		{			QAngle eyeAngle = target->EyeAngles();			prediction->SetViewAngles( eyeAngle );		}	}	m_flLastDistance = m_flDistance;	m_flLastAngleUpdateTime = -1;}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:28,


示例13: ClientEntityList

//-----------------------------------------------------------------------------// Performs the think function//-----------------------------------------------------------------------------void CClientThinkList::PerformThinkFunction( ThinkEntry_t *pEntry, float flCurtime ){	IClientThinkable *pThink = ClientEntityList().GetClientThinkableFromHandle( pEntry->m_hEnt );	if ( !pThink )	{		RemoveThinkable( pEntry->m_hEnt );		return;	}	if ( pEntry->m_flNextClientThink == CLIENT_THINK_ALWAYS )	{		// NOTE: The Think function here could call SetNextClientThink		// which would cause it to be removed + readded into the list		pThink->ClientThink();	}	else if ( pEntry->m_flNextClientThink == FLT_MAX )	{		// This is an entity that doesn't need to think again; remove it		RemoveThinkable( pEntry->m_hEnt );	}	else	{		Assert( pEntry->m_flNextClientThink <= flCurtime );		// Indicate we're not going to think again		pEntry->m_flNextClientThink = FLT_MAX;		// NOTE: The Think function here could call SetNextClientThink		// which would cause it to be readded into the list		pThink->ClientThink();	}	// Set this after the Think calls in case they look at LastClientThink	pEntry->m_flLastClientThink = flCurtime;}
开发者ID:AluminumKen,项目名称:hl2sb-src,代码行数:38,


示例14: FX_BuildTeslaHitbox

//-----------------------------------------------------------------------------// Purpose: Tesla effect//-----------------------------------------------------------------------------void FX_BuildTeslaHitbox( const CEffectData &data ){	Vector vColor( 1, 1, 1 );	C_BaseEntity *pEntity = ClientEntityList().GetEnt( data.entindex() );	C_BaseAnimating *pAnimating = pEntity ? pEntity->GetBaseAnimating() : NULL;	if (!pAnimating)		return;	studiohdr_t *pStudioHdr = modelinfo->GetStudiomodel( pAnimating->GetModel() );	if (!pStudioHdr)		return;	mstudiohitboxset_t *set = pStudioHdr->pHitboxSet( pAnimating->GetHitboxSet() );	if ( !set )		return;	matrix3x4_t	*hitboxbones[MAXSTUDIOBONES];	if ( !pAnimating->HitboxToWorldTransforms( hitboxbones ) )		return;	int nBeamCount = (int)(data.m_flMagnitude + 0.5f);	for ( int i = 0; i < nBeamCount; ++i )	{		int nStartHitBox = random->RandomInt( 1, set->numhitboxes );		int nEndHitBox = random->RandomInt( 1, set->numhitboxes );		FX_BuildTeslaHitbox( pEntity, nStartHitBox, nEndHitBox, data.m_flScale, vColor, random->RandomFloat( 0.05f, 0.2f ) );	}}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:32,


示例15: ClientsideProjectileSyringeCallback

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void ClientsideProjectileSyringeCallback( const CEffectData &data ){	// Get the syringe and add it to the client entity list, so we can attach a particle system to it.	C_TFPlayer *pPlayer = dynamic_cast<C_TFPlayer*>( ClientEntityList().GetBaseEntityFromHandle( data.m_hEntity ) );	if ( pPlayer )	{		C_LocalTempEntity *pSyringe = ClientsideProjectileCallback( data, SYRINGE_GRAVITY );		if ( pSyringe )		{			switch (pPlayer->GetTeamNumber())			{			case TF_TEAM_RED:				pSyringe->m_nSkin = 0;				break;			case TF_TEAM_BLUE:				pSyringe->m_nSkin = 1;				break;			case TF_TEAM_GREEN:				pSyringe->m_nSkin = 2;				break;			case TF_TEAM_YELLOW:				pSyringe->m_nSkin = 3;				break;			}			bool bCritical = ( ( data.m_nDamageType & DMG_CRITICAL ) != 0 );			pPlayer->m_Shared.SetParticleToMercColor(				pSyringe->AddParticleEffect(GetSyringeTrailParticleName(pPlayer->GetTeamNumber(), bCritical))				);			pSyringe->AddEffects( EF_NOSHADOW );			pSyringe->flags |= FTENT_USEFASTCOLLISIONS;		}	}}
开发者ID:TenmaPL,项目名称:TF2Classic,代码行数:36,


示例16: Restore

	virtual void Restore( const SaveRestoreFieldInfo_t &fieldInfo, IRestore *pRestore )	{		CBaseEntity *pOwnerEntity = pRestore->GetGameSaveRestoreInfo()->GetCurrentEntityContext();		bool bFoundEntity = true;				if ( IsValidEntityPointer(pOwnerEntity) == false )		{			bFoundEntity = false;#if defined( CLIENT_DLL )			pOwnerEntity = ClientEntityList().GetBaseEntityFromHandle( pOwnerEntity->GetRefEHandle() );			if ( pOwnerEntity  )			{				bFoundEntity = true;			}#endif		}		AssertMsg( pOwnerEntity && bFoundEntity == true, "Physics save/load is only suitable for entities" );		if ( m_type == PIID_UNKNOWN )		{			AssertMsg( 0, "Unknown physics save/load type");			return;		}				g_PhysSaveRestoreBlockHandler.QueueRestore( pOwnerEntity, fieldInfo.pTypeDesc, (void **)fieldInfo.pField, m_type );	}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:30,


示例17: ClientEntityList

IterationRetval_t CRagdollEnumerator::EnumElement( IHandleEntity *pHandleEntity ){	C_BaseEntity *pEnt = ClientEntityList().GetBaseEntityFromHandle( pHandleEntity->GetRefEHandle() );	if ( pEnt == NULL )		return ITERATION_CONTINUE;	C_BaseAnimating *pModel = static_cast< C_BaseAnimating * >( pEnt );	// If the ragdoll was created on this tick, then the forces were already applied on the server	if ( pModel == NULL || WasRagdollCreatedOnCurrentTick( pEnt ) )		return ITERATION_CONTINUE;	IPhysicsObject *pPhysicsObject = pModel->VPhysicsGetObject();	if ( pPhysicsObject == NULL )		return ITERATION_CONTINUE;	trace_t tr;	enginetrace->ClipRayToEntity( m_rayShot, MASK_SHOT, pModel, &tr );	if ( tr.fraction < 1.0 )	{		pModel->ImpactTrace( &tr, m_iDamageType, NULL );		m_bHit = true;		//FIXME: Yes?  No?		return ITERATION_STOP;	}	return ITERATION_CONTINUE;}
开发者ID:Davideogame,项目名称:TheHunted,代码行数:30,


示例18: ClientsideProjectileNailCallback

//-----------------------------------------------------------------------------// Purpose: //-----------------------------------------------------------------------------void ClientsideProjectileNailCallback(const CEffectData &data){	C_TFPlayer *pPlayer = dynamic_cast<C_TFPlayer*>(ClientEntityList().GetBaseEntityFromHandle(data.m_hEntity));	if (pPlayer)	{		C_LocalTempEntity *pNail = ClientsideProjectileCallback(data, NAILGUN_NAIL_GRAVITY);		if (pNail)		{			switch (pPlayer->GetTeamNumber())			{			case TF_TEAM_RED:				pNail->m_nSkin = 0;				break;			case TF_TEAM_BLUE:				pNail->m_nSkin = 1;				break;			case TF_TEAM_GREEN:				pNail->m_nSkin = 2;				break;			case TF_TEAM_YELLOW:				pNail->m_nSkin = 3;				break;			}			bool bCritical = ((data.m_nDamageType & DMG_CRITICAL) != 0);			pPlayer->m_Shared.SetParticleToMercColor(				pNail->AddParticleEffect(GetNailTrailParticleName(pPlayer->GetTeamNumber(), bCritical))				);			pNail->AddEffects(EF_NOSHADOW);			pNail->flags |= FTENT_USEFASTCOLLISIONS;		}	}}
开发者ID:TenmaPL,项目名称:TF2Classic,代码行数:35,


示例19: AddKeyFrame

void CViewAngleAnimation::Spawn( void ){	m_iFlags = 0;	QAngle angles;	engine->GetViewAngles( angles );		/*	if ( m_iFlags & VIEWANIM_RELATIVE )	{		AddKeyFrame( new CViewAngleKeyFrame( vec3_angle, 0.0, 0 ) );		// seed this so we can add keyframes and have them calc the delta properly		m_vecBaseAngles = angles;	}	else	{		AddKeyFrame( new CViewAngleKeyFrame( angles, 0.0, 0 ) );	}	*/	m_bFinished = true;	// don't run right away	ClientEntityList().AddNonNetworkableEntity(	this );	SetNextClientThink( CLIENT_THINK_ALWAYS );}
开发者ID:paralin,项目名称:hl2sdk,代码行数:25,


示例20: UTIL_Tracer

//-----------------------------------------------------------------------------// Purpose: Make a tracer effect//-----------------------------------------------------------------------------void UTIL_Tracer( const Vector &vecStart, const Vector &vecEnd, int iEntIndex, int iAttachment, float flVelocity, bool bWhiz, char *pCustomTracerName ){	CEffectData data;	data.m_vStart = vecStart;	data.m_vOrigin = vecEnd;	data.m_hEntity = ClientEntityList().EntIndexToHandle( iEntIndex );	data.m_flScale = flVelocity;	// Flags	if ( bWhiz )	{		data.m_fFlags |= TRACER_FLAG_WHIZ;	}	if ( iAttachment != TRACER_DONT_USE_ATTACHMENT )	{		data.m_fFlags |= TRACER_FLAG_USEATTACHMENT;		// Stomp the start, since it's not going to be used anyway		data.m_vStart[0] = iAttachment;	}	// Fire it off	if ( pCustomTracerName )	{		DispatchEffect( pCustomTracerName, data );	}	else	{		DispatchEffect( "Tracer", data );	}}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:33,


示例21: Assert

void C_ASW_Door::ImpactTrace( trace_t *pTrace, int iDamageType, char *pCustomImpactName ){	Assert( pTrace->m_pEnt );	CBaseEntity *pEntity = pTrace->m_pEnt; 	// Build the impact data	CEffectData data;	data.m_vOrigin = pTrace->endpos;	data.m_vStart = pTrace->startpos;	data.m_nSurfaceProp = pTrace->surface.surfaceProps;		if (!m_bShootable)		data.m_nSurfaceProp = physprops->GetSurfaceIndex("metal");	data.m_nDamageType = iDamageType;	data.m_nHitBox = pTrace->hitbox;#ifdef CLIENT_DLL	data.m_hEntity = ClientEntityList().EntIndexToHandle( pEntity->entindex() );#else	data.m_nEntIndex = pEntity->entindex();#endif	// Send it on its way	if ( !pCustomImpactName )	{		DispatchEffect( "Impact", data );	}	else	{		DispatchEffect( pCustomImpactName, data );	}}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:31,


示例22: ClientEntityList

// Actual work codeIterationRetval_t CASW_Scanner_Objects_Enumerator::EnumElement( IHandleEntity *pHandleEntity ){#ifndef CLIENT_DLL		CBaseEntity *pEnt = gEntList.GetBaseEntity( pHandleEntity->GetRefEHandle() );#else		C_BaseEntity *pEnt = ClientEntityList().GetBaseEntityFromHandle( pHandleEntity->GetRefEHandle() );#endif		if ( pEnt == NULL )		return ITERATION_CONTINUE;	if (!ValidScannerObject(pEnt))		return ITERATION_CONTINUE;		Vector deltaPos = pEnt->GetAbsOrigin() - m_vecScannerCenter;	if ( deltaPos.LengthSqr() > m_flRadiusSquared )		return ITERATION_CONTINUE;	if ( m_vecScannerCenter.z - pEnt->GetAbsOrigin().z > m_flRadius / 3 )		return ITERATION_CONTINUE;		CHandle< CBaseEntity > h;	h = pEnt;	m_Objects.AddToTail( h );	return ITERATION_CONTINUE;}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:28,


示例23: LeakEffect

//------------------------------------------------------------------------------// Purpose : Create leak effect if material requests it// Input   :// Output  ://------------------------------------------------------------------------------void LeakEffect( trace_t &tr ){	Vector			diffuseColor, baseColor;	Vector			vTraceDir	= (tr.endpos - tr.startpos);	VectorNormalize(vTraceDir);	Vector			vTraceStart = tr.endpos - 0.1*vTraceDir;	Vector			vTraceEnd	= tr.endpos + 0.1*vTraceDir;	IMaterial*		pTraceMaterial = engine->TraceLineMaterialAndLighting( vTraceStart, vTraceEnd, diffuseColor, baseColor );	if (!pTraceMaterial)		return;	bool			found;	IMaterialVar	*pLeakVar = pTraceMaterial->FindVar( "$leakamount", &found, false );	if( !found )		return;	C_Splash* pLeak = new C_Splash();	if (!pLeak)		return;	ClientEntityList().AddNonNetworkableEntity( pLeak->GetIClientUnknown() );	IMaterialVar*	pLeakColorVar = pTraceMaterial->FindVar( "$leakcolor", &found );	if (found)	{		Vector color;		pLeakColorVar->GetVecValue(color.Base(),3);		pLeak->m_vStartColor = pLeak->m_vEndColor = color;	}	IMaterialVar*	pLeakNoiseVar = pTraceMaterial->FindVar( "$leaknoise", &found );	if (found)	{		pLeak->m_flNoise = pLeakNoiseVar->GetFloatValue();	}	IMaterialVar*	pLeakForceVar = pTraceMaterial->FindVar( "$leakforce", &found );	if (found)	{		float flForce = pLeakForceVar->GetFloatValue();		pLeak->m_flSpeed		 = flForce;		pLeak->m_flSpeedRange	 = pLeak->m_flNoise * flForce;	}	pLeak->m_flSpawnRate		= pLeakVar->GetFloatValue();;	pLeak->m_flParticleLifetime = 10;	pLeak->m_flWidthMin			= 1;	pLeak->m_flWidthMax			= 5;	pLeak->SetLocalOrigin( tr.endpos );		QAngle angles;	VectorAngles( tr.plane.normal, angles );	pLeak->SetLocalAngles( angles );	pLeak->Start(&g_ParticleMgr, NULL);	pLeak->m_flStopEmitTime	= gpGlobals->curtime+5.0;	pLeak->SetNextClientThink(gpGlobals->curtime+20.0);}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:64,


示例24: ClientEntityList

C_BaseNetworkable::C_BaseNetworkable(){	m_bDormant = true;	index = 0xFFFF;	m_ClientHandle = ClientEntityList().InvalidHandle();	m_hThink = INVALID_THINK_HANDLE;	m_DataChangeEventRef = -1;}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:8,


示例25: Start

//-----------------------------------------------------------------------------// Purpose: FIXME: what's the right way to do this?//-----------------------------------------------------------------------------void C_FireSmoke::StartClientOnly( void ){	Start();	ClientEntityList().AddNonNetworkableEntity(	this );	m_Partition = partition->CreateHandle( GetIClientUnknown() );	view->AddVisibleEntity( this );}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:11,


示例26: ClientEntityList

// Actual work codeIterationRetval_t CASW_UsableObjectsEnumerator::EnumElement( IHandleEntity *pHandleEntity ){	if ( !m_pLocal )		return ITERATION_STOP;#ifndef CLIENT_DLL		CBaseEntity *pEnt = gEntList.GetBaseEntity( pHandleEntity->GetRefEHandle() );#else		C_BaseEntity *pEnt = ClientEntityList().GetBaseEntityFromHandle( pHandleEntity->GetRefEHandle() );#endif		if ( pEnt == NULL )		return ITERATION_CONTINUE;	if ( pEnt == m_pLocal )		return ITERATION_CONTINUE;	C_ASW_Marine *pMarine = m_pLocal->GetViewMarine();	if (!pMarine)		return ITERATION_CONTINUE;#ifdef CLIENT_DLL	IASW_Client_Usable_Entity *pUsable = dynamic_cast<IASW_Client_Usable_Entity*>(pEnt);#else	IASW_Server_Usable_Entity *pUsable = dynamic_cast<IASW_Server_Usable_Entity*>(pEnt);#endif	if (!pUsable || !pUsable->IsUsable(pMarine))		return ITERATION_CONTINUE;		if (pUsable->NeedsLOSCheck())	{		trace_t tr;		Vector vecSrc = pMarine->WorldSpaceCenter();		Vector vecDest = pEnt->WorldSpaceCenter();		UTIL_TraceLine(vecSrc, vecDest, MASK_SOLID_BRUSHONLY, pMarine, COLLISION_GROUP_NONE, &tr);		if (tr.fraction < 1.0f && tr.m_pEnt != pEnt)	// didn't hit our target		{#ifdef CLIENT_DLL			if (asw_debug_hud.GetBool())				debugoverlay->AddLineOverlay(vecSrc, tr.endpos, 255, 0, 0, true, 0.1f);#endif			float dist = (vecSrc - vecDest).Length2D();			if (dist > 30)	// and too far away				return ITERATION_CONTINUE;		}#ifdef CLIENT_DLL		if (asw_debug_hud.GetBool())			debugoverlay->AddLineOverlay(vecSrc, tr.endpos, 0, 255, 0, true, 0.1f);#endif	}	CHandle< C_BaseEntity > h;	h = pEnt;	m_Objects.AddToTail( h );	return ITERATION_CONTINUE;}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:59,


示例27: ClientEntityList

C_BaseEntity* C_Camera::GetTarget(){	if ( m_nTarget <= 0 )		return NULL;	C_BaseEntity* target = ClientEntityList().GetEnt( m_nTarget );	return target;}
开发者ID:rain2372,项目名称:IOS-1,代码行数:9,


示例28: Start

//-----------------------------------------------------------------------------// Purpose: FIXME: what's the right way to do this?//-----------------------------------------------------------------------------void C_FireSmoke::StartClientOnly( void ){	Start();	ClientEntityList().AddNonNetworkableEntity(	this );	CollisionProp()->CreatePartitionHandle();	AddEffects( EF_NORECEIVESHADOW | EF_NOSHADOW );	AddToLeafSystem();}
开发者ID:TalonBraveInfo,项目名称:InvasionSource,代码行数:12,


示例29: IsValidEntityPointer

static bool IsValidEntityPointer( void *ptr ){#if !defined( CLIENT_DLL )	return gEntList.IsEntityPtr( ptr );#else	// Walk entities looking for pointer	int c = ClientEntityList().GetHighestEntityIndex();	for ( int i = 0; i <= c; i++ )	{		CBaseEntity *e = ClientEntityList().GetBaseEntity( i );		if ( !e )			continue;		if ( e == ptr )			return true;	}	return false;#endif}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:19,



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


C++ ClientName函数代码示例
C++ ClientConnect函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。