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


C++ AddEFlags函数代码示例

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


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

示例1: AddEFlags

//-----------------------------------------------------------------------------
// Purpose: 
// Input  : check - 
//-----------------------------------------------------------------------------
void C_BaseEntity::SetCheckUntouch( bool check )
{
	// Invalidate touchstamp
	if ( check )
	{
		touchStamp++;
		AddEFlags( EFL_CHECK_UNTOUCH );
	}
	else
	{
		RemoveEFlags( EFL_CHECK_UNTOUCH );
	}
}
开发者ID:Au-heppa,项目名称:source-sdk-2013,代码行数:17,代码来源:physics_main_client.cpp

示例2: Precache

//-----------------------------------------------------------------------------
// Purpose: the entity
//-----------------------------------------------------------------------------
void CNPC_RocketTurret::Spawn( void )
{ 
	Precache();

	BaseClass::Spawn();

	SetViewOffset( vec3_origin );

	AddEFlags( EFL_NO_DISSOLVE );

	SetModel( ROCKET_TURRET_MODEL_NAME );
	SetSolid( SOLID_VPHYSICS );

	m_iMuzzleAttachment = LookupAttachment ( "barrel" );
	m_iLightAttachment = LookupAttachment ( "eye" );

	m_iPosePitch = LookupPoseParameter( "aim_pitch" );
	m_iPoseYaw   = LookupPoseParameter( "aim_yaw" );

	m_vecCurrentAngles = m_vecGoalAngles = GetAbsAngles();

	CreateVPhysics();

	//Set our autostart state
	m_bEnabled	 = ( ( m_spawnflags & SF_ROCKET_TURRET_START_INACTIVE ) == false );

	// Set Locked sprite
	if ( m_bEnabled )
	{
		m_iLaserState = 1;
		SetSequence(LookupSequence("idle"));
	}
	else
	{
		m_iLaserState = 0;
		SetSequence(LookupSequence("inactive"));
	}
	SetCycle(1.0f);
	UpdateSkin( ROCKET_SKIN_IDLE );

	SetPoseParameter( "aim_pitch", 0 );
	SetPoseParameter( "aim_yaw", -180 );

	if ( m_bEnabled )
	{
		SetThink( &CNPC_RocketTurret::FollowThink );
	}
	
	SetNextThink( gpGlobals->curtime + ROCKET_TURRET_THINK_RATE );
}
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:53,代码来源:npc_rocket_turret.cpp

示例3: Precache

//-----------------------------------------------------------------------------
// Spawn
//-----------------------------------------------------------------------------
void CNPC_Hutman::Spawn()
{
    Precache();

    m_iHealth = 80;

    m_iszCombatExpression = m_iszIdleExpression = m_iszAlertExpression = MAKE_STRING( HUTMAN_IDLE_SCENE );

    BaseClass::Spawn();

    AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL | EFL_NO_PHYSCANNON_INTERACTION );

    NPCInit();
}
开发者ID:P1x3lF3v3r,项目名称:Estranged-Act-1,代码行数:17,代码来源:npc_hutman.cpp

示例4: entindex

//------------------------------------------------------------------------------
// Purpose:
//------------------------------------------------------------------------------
void CAmbientGeneric::Activate( void )
{
	BaseClass::Activate();

	// Initialize sound source.  If no source was given, or source can't be found
	// then this is the source
	if (m_hSoundSource == NULL)
	{
		if (m_sSourceEntName != NULL_STRING)
		{
			m_hSoundSource = gEntList.FindEntityByName( NULL, m_sSourceEntName );
			if ( m_hSoundSource != NULL )
			{
				m_nSoundSourceEntIndex = m_hSoundSource->entindex();
			}
		}

		if (m_hSoundSource == NULL)
		{
			m_hSoundSource = this;
			m_nSoundSourceEntIndex = entindex();
		}
		else
		{
			if ( !FBitSet( m_spawnflags, SF_AMBIENT_SOUND_EVERYWHERE ) )
			{
				AddEFlags( EFL_FORCE_CHECK_TRANSMIT );
			}
		}
	}

	// If active start the sound
	if ( m_fActive )
	{
		SoundFlags_t flags = SND_SPAWNING;
		// If we are loading a saved game, we can't write into the init/signon buffer here, so just issue
		//  as a regular sound message...
		if ( gpGlobals->eLoadType == MapLoad_Transition ||
			 gpGlobals->eLoadType == MapLoad_LoadGame || 
			 g_pGameRules->InRoundRestart() )
		{
			flags = SND_NOFLAGS;
		}
	
		SendSound( flags );

		SetNextThink( gpGlobals->curtime + 0.1f );
	}
}
开发者ID:Bubbasacs,项目名称:FinalProj,代码行数:52,代码来源:sound.cpp

示例5: AddEFlags

CWorld::CWorld( )
{
	AddEFlags( EFL_NO_AUTO_EDICT_ATTACH | EFL_KEEP_ON_RECREATE_ENTITIES );
	NetworkProp()->AttachEdict( INDEXENT(RequiredEdictIndex()) );
	ActivityList_Init();
	EventList_Init();
	
	SetSolid( SOLID_BSP );
	SetMoveType( MOVETYPE_NONE );

	m_bColdWorld = false;

	// Set this in the constructor for legacy maps (sjb)
	m_iTimeOfDay = TIME_MIDNIGHT;
}
开发者ID:DeadFuze,项目名称:swarm-sdk,代码行数:15,代码来源:world.cpp

示例6: AddEFlags

CFire::CFire( void )
{
	m_flFuel = 0.0f;
	m_flAttackTime = 0.0f;
	m_flDamageTime = 0.0f;
	m_lastDamage = 0;
	m_nFireType = FIRE_NATURAL;

	//Spreading
	m_flHeatAbsorb = 8.0f;
	m_flHeatLevel = 0;

	// Must be in the constructor!
	AddEFlags( EFL_USE_PARTITION_WHEN_NOT_SOLID );
}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:15,代码来源:fire.cpp

示例7: Precache

//-----------------------------------------------------------------------------
// Spawn...
//-----------------------------------------------------------------------------
void CVGuiScreen::Spawn()
{
	Precache();

	// This has no model, but we want it to transmit if it's in the PVS anyways
	AddEFlags( EFL_FORCE_CHECK_TRANSMIT );
	m_nAttachmentIndex = 0;
	SetSolid( SOLID_OBB );
	AddSolidFlags( FSOLID_NOT_SOLID );
	SetActualSize( m_flWidth, m_flHeight );
	m_fScreenFlags.Set( VGUI_SCREEN_ACTIVE );

	m_takedamage = DAMAGE_NO;
	AddFlag( FL_NOTARGET );
}
开发者ID:paralin,项目名称:hl2sdk,代码行数:18,代码来源:vguiscreen.cpp

示例8: Precache

//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CTFBaseRocket::Spawn( void )
{
    // Precache.
    Precache();

    // Client specific.
#ifdef CLIENT_DLL

    m_flSpawnTime = gpGlobals->curtime;
    BaseClass::Spawn();

    // Server specific.
#else

    //Derived classes must have set model.
    Assert( GetModel() );

    string_t strModelOverride = NULL_STRING;
    CALL_ATTRIB_HOOK_STRING_ON_OTHER( m_hLauncher.Get(), strModelOverride, custom_projectile_model );
    if ( strModelOverride != NULL_STRING )
    {
        SetModel( STRING( strModelOverride ) );
    }

    SetSolid( SOLID_BBOX );
    SetMoveType( MOVETYPE_FLY, MOVECOLLIDE_FLY_CUSTOM );
    AddEFlags( EFL_NO_WATER_VELOCITY_CHANGE );
    AddEffects( EF_NOSHADOW );

    SetCollisionGroup( TFCOLLISION_GROUP_ROCKETS );

    UTIL_SetSize( this, -Vector( 0, 0, 0 ), Vector( 0, 0, 0 ) );

    // Setup attributes.
    m_takedamage = DAMAGE_NO;
    SetGravity( 0.0f );

    // Setup the touch and think functions.
    SetTouch( &CTFBaseRocket::RocketTouch );
    SetThink( &CTFBaseRocket::FlyThink );
    SetNextThink( gpGlobals->curtime );

    // Don't collide with players on the owner's team for the first bit of our life
    m_flCollideWithTeammatesTime = gpGlobals->curtime + 0.25;
    m_bCollideWithTeammates = TFGameRules()->IsDeathmatch() ? true : false;

#endif
}
开发者ID:Deathreus,项目名称:TF2Classic,代码行数:51,代码来源:tf_weaponbase_rocket.cpp

示例9: AddEFlags

CSun::CSun()
{
	m_vDirection.Init( 0, 0, 1 );
	
	m_bUseAngles = false;
	m_flPitch = 0;
	m_flYaw = 0;
	m_nSize = 16;

	m_bOn = true;
	AddEFlags( EFL_FORCE_CHECK_TRANSMIT );

	m_strMaterial = NULL_STRING;
	m_strOverlayMaterial = NULL_STRING;
	m_nOverlaySize = -1;
}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:16,代码来源:sun.cpp

示例10: Precache

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CCitadelEnergyCore::Spawn( void )
{
	Precache();

	UTIL_SetSize( this, Vector( -8, -8, -8 ), Vector( 8, 8, 8 ) );

	// See if we start active
	if ( HasSpawnFlags( SF_ENERGYCORE_START_ON ) )
	{
		m_nState = (int)ENERGYCORE_STATE_DISCHARGING;
		m_flStartTime = gpGlobals->curtime;
	}

	// No model but we still need to force this!
	AddEFlags( EFL_FORCE_CHECK_TRANSMIT );
}
开发者ID:paralin,项目名称:hl2sdk,代码行数:19,代码来源:citadel_effects.cpp

示例11: Precache

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CNPC_Barney::Spawn( void )
{
	Precache();

	m_iHealth = 80;
	m_iszIdleExpression = MAKE_STRING("scenes/Expressions/BarneyIdle.vcd");
	m_iszAlertExpression = MAKE_STRING("scenes/Expressions/BarneyAlert.vcd");
	m_iszCombatExpression = MAKE_STRING("scenes/Expressions/BarneyCombat.vcd");

	BaseClass::Spawn();

	AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL | EFL_NO_PHYSCANNON_INTERACTION );

	NPCInit();

	SetUse( &CNPC_Barney::UseFunc );
}
开发者ID:HL2-Ghosting-Team,项目名称:src,代码行数:20,代码来源:npc_barney.cpp

示例12: Precache

//------------------------------------------------------------------------------
// Spawn
//------------------------------------------------------------------------------
void CQUAGrenadeHelicopter::Spawn( void )
{
	Precache();

	// point sized, solid, bouncing
	SetCollisionGroup( COLLISION_GROUP_PROJECTILE );
	SetModel( "models/combine_helicopter/helicopter_bomb01.mdl" );

	
		SetSolid( SOLID_BBOX );
		SetCollisionBounds( Vector( -12.5, -12.5, -12.5 ), Vector( 12.5, 12.5, 12.5 ) );
		VPhysicsInitShadow( false, false );
		SetMoveType( MOVETYPE_FLYGRAVITY, MOVECOLLIDE_FLY_CUSTOM );
		SetElasticity( 0.5f );
		AddEffects( EF_NOSHADOW );
	

	// We're always being dropped beneath the helicopter; need to not
	// be affected by the rotor wash
	AddEFlags( EFL_NO_ROTORWASH_PUSH );

	// contact grenades arc lower
	SetGravity( UTIL_ScaleForGravity( 400 ) );	// use a lower gravity for grenades to make them easier to see
	QAngle angles;
	VectorAngles(GetAbsVelocity(), angles );
	SetLocalAngles( angles );
	
	SetThink( NULL );
	
	// Tumble in air
	QAngle vecAngVel( random->RandomFloat ( -100, -500 ), 0, 0 );
	SetLocalAngularVelocity( vecAngVel );
	
	// Explode on contact
	SetTouch( &CQUAGrenadeHelicopter::ExplodeConcussion );

	m_bActivated = false;
	m_pWarnSound = NULL;

	m_flDamage = 75.0;

	// Allow player to blow this puppy up in the air
	m_takedamage = DAMAGE_YES;

	g_pNotify->AddEntity( this, this );
}
开发者ID:WorldGamers,项目名称:Mobile-Forces-Source,代码行数:49,代码来源:vehicle_helicopter.cpp

示例13: Precache

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CNPC_Fisherman::Spawn( void )
{
	m_iHatLayer = -1;
	m_iHatState = -1;

	Precache();

	m_iHealth = 80;

//	m_iszIdleExpression = MAKE_STRING("scenes/Expressions/FishermanIdle.vcd");
//	m_iszAlertExpression = MAKE_STRING("scenes/Expressions/FishermanAlert.vcd");
//	m_iszCombatExpression = MAKE_STRING("scenes/Expressions/FishermanCombat.vcd");

	BaseClass::Spawn();

	AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL | EFL_NO_PHYSCANNON_INTERACTION );

	NPCInit();
}
开发者ID:RaraFolf,项目名称:FIREFIGHT-RELOADED-src-sdk-2013,代码行数:22,代码来源:npc_fisherman.cpp

示例14: Precache

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CGrenadeSpit::Spawn( void )
{
	Precache( );
	SetSolid( SOLID_BBOX );
	SetMoveType( MOVETYPE_FLYGRAVITY );
	SetSolidFlags( FSOLID_NOT_STANDABLE );

	SetModel( "models/spitball_large.mdl" );
	UTIL_SetSize( this, vec3_origin, vec3_origin );

	SetUse( &CBaseGrenade::DetonateUse );
	SetTouch( &CGrenadeSpit::GrenadeSpitTouch );
	SetNextThink( gpGlobals->curtime + 0.1f );

	m_flDamage		= sk_antlion_worker_spit_grenade_dmg.GetFloat();
	m_DmgRadius		= sk_antlion_worker_spit_grenade_radius.GetFloat();
	m_takedamage	= DAMAGE_NO;
	m_iHealth		= 1;

	SetGravity( UTIL_ScaleForGravity( SPIT_GRAVITY ) );
	SetFriction( 0.8f );

	SetCollisionGroup( HL2COLLISION_GROUP_SPIT );

	AddEFlags( EFL_FORCE_CHECK_TRANSMIT );

	// We're self-illuminating, so we don't take or give shadows
	AddEffects( EF_NOSHADOW|EF_NORECEIVESHADOW );

	// Create the dust effect in place
	m_hSpitEffect = (CParticleSystem *) CreateEntityByName( "info_particle_system" );
	if ( m_hSpitEffect != NULL )
	{
		// Setup our basic parameters
		m_hSpitEffect->KeyValue( "start_active", "1" );
		m_hSpitEffect->KeyValue( "effect_name", "antlion_spit_trail" );
		m_hSpitEffect->SetParent( this );
		m_hSpitEffect->SetLocalOrigin( vec3_origin );
		DispatchSpawn( m_hSpitEffect );
		if ( gpGlobals->curtime > 0.5f )
			m_hSpitEffect->Activate();
	}
}
开发者ID:xxauroraxx,项目名称:Source.Python,代码行数:46,代码来源:grenade_spit.cpp

示例15: GetModelName

//-----------------------------------------------------------------------------
// Spawn
//-----------------------------------------------------------------------------
void CNPC_Eli::Spawn()
{
	// Eli is allowed to use multiple models, because he appears in the pod.
	// He defaults to his normal model.
	char *szModel = (char *)STRING( GetModelName() );
	if (!szModel || !*szModel)
	{
		szModel = "models/eli.mdl";
		SetModelName( AllocPooledString(szModel) );
	}

	Precache();
	SetModel( szModel );

	BaseClass::Spawn();

	SetHullType(HULL_HUMAN);
	SetHullSizeNormal();

	// If Eli has a parent, he's currently inside a pod. Prevent him from moving.
	if ( GetMoveParent() )
	{
		SetSolid( SOLID_BBOX );
		AddSolidFlags( FSOLID_NOT_STANDABLE );
		SetMoveType( MOVETYPE_NONE );

		CapabilitiesAdd( bits_CAP_ANIMATEDFACE | bits_CAP_TURN_HEAD );
		CapabilitiesAdd( bits_CAP_FRIENDLY_DMG_IMMUNE );
	}
	else
	{
		SetupWithoutParent();
	}

	AddEFlags( EFL_NO_DISSOLVE | EFL_NO_MEGAPHYSCANNON_RAGDOLL | EFL_NO_PHYSCANNON_INTERACTION );
	SetBloodColor( BLOOD_COLOR_RED );
	m_iHealth			= 8;
	m_flFieldOfView		= 0.5;// indicates the width of this NPC's forward view cone ( as a dotproduct result )
	m_NPCState			= NPC_STATE_NONE;

	NPCInit();
}
开发者ID:Muini,项目名称:Nag-asw,代码行数:45,代码来源:npc_eli.cpp


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