• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AddFlag函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Precache

void CBaseTurret::Spawn()
{ 
	Precache( );
	SetNextThink( gpGlobals->curtime + 1 );
	SetMoveType( MOVETYPE_FLY );
	m_nSequence		= 0;
	m_flCycle		= 0;
	SetSolid( SOLID_SLIDEBOX );
	m_takedamage		= DAMAGE_YES;
	AddFlag( FL_AIMTARGET );

	m_iAmmoType = g_pGameRules->GetAmmoDef()->Index("SMG1");

	AddFlag( FL_NPC );

	if (( m_spawnflags & SF_NPC_TURRET_AUTOACTIVATE ) && !( m_spawnflags & SF_NPC_TURRET_STARTINACTIVE ))
	{
		m_iAutoStart = true;
	}

	ResetSequenceInfo( );

	SetPoseParameter( TURRET_BC_YAW, 0 );
	SetPoseParameter( TURRET_BC_PITCH, 0 );

	// Activities
	ADD_CUSTOM_ACTIVITY( CBaseTurret, ACT_TURRET_OPEN );
	ADD_CUSTOM_ACTIVITY( CBaseTurret, ACT_TURRET_CLOSE );
	ADD_CUSTOM_ACTIVITY( CBaseTurret, ACT_TURRET_CLOSED_IDLE );
	ADD_CUSTOM_ACTIVITY( CBase`matTurret, ACT_TURRET_OPEN_IDLE );
	ADD_CUSTOM_ACTIVITY( CBaseTurret, ACT_TURRET_FIRE );
	ADD_CUSTOM_ACTIVITY( CBaseTurret, ACT_TURRET_RELOAD );
}
开发者ID:Filip98,项目名称:source-sdk-2013,代码行数:33,代码来源:npc_turret.cpp


示例2: TemplateCommand

TemplateCommand ::	TemplateCommand( const string & name,
									 const string & desc )
		: Command( name, desc, TPL_HELP ) {

	AddFlag( ALib::CommandLineFlag( FLAG_TFILE, true, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_FNAMES, false, 1 ) );
}
开发者ID:darrennolan,项目名称:csvfix,代码行数:7,代码来源:csved_template.cpp


示例3: DateFormatCommand

DateFormatCommand  :: DateFormatCommand( const string & name,
        const string & desc )
    : Command( name, desc, DFMT_HELP ) {

    AddFlag( ALib::CommandLineFlag( FLAG_COLS, true, 1 ) );
    AddFlag( ALib::CommandLineFlag( FLAG_FMT, true, 1 ) );
}
开发者ID:moissinac,项目名称:csvfix,代码行数:7,代码来源:csved_date.cpp


示例4: Command

EditCommand ::EditCommand( const string & name,
								const string & desc )
		: Command( name, desc, EDIT_HELP ) {

	AddFlag( ALib::CommandLineFlag( FLAG_EDIT, true, 1, true ) );
	AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1, false ) );
}
开发者ID:bminossi,项目名称:csvfix,代码行数:7,代码来源:csved_edit.cpp


示例5: ValidateCommand

ValidateCommand ::	ValidateCommand( const string & name,
										const string & desc )
		: Command( name, desc, VALID_HELP ), mOutMode( Reports ) {
	AddFlag( ALib::CommandLineFlag( FLAG_VFILE, true, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_OMODE, false, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_ERRCODE, false, 0 ) );
}
开发者ID:bminossi,项目名称:csvfix,代码行数:7,代码来源:csved_valid.cpp


示例6: memcpy

CWarMap::CWarMap(long lMapIndex, const TGuildWarInfo & r_info, TWarMapInfo * pkWarMapInfo, DWORD dwGuildID1, DWORD dwGuildID2)
{
	m_kMapInfo = *pkWarMapInfo;
	m_kMapInfo.lMapIndex = lMapIndex;

	memcpy(&m_WarInfo, &r_info, sizeof(TGuildWarInfo));

	m_TeamData[0].Initialize();
	m_TeamData[0].dwID = dwGuildID1;
	m_TeamData[0].pkGuild = CGuildManager::instance().TouchGuild(dwGuildID1);

	m_TeamData[1].Initialize();
	m_TeamData[1].dwID = dwGuildID2;
	m_TeamData[1].pkGuild = CGuildManager::instance().TouchGuild(dwGuildID2);
	m_iObserverCount = 0;

	war_map_info* info = AllocEventInfo<war_map_info>();
	info->pWarMap = this;

	SetBeginEvent(event_create(war_begin_event, info, PASSES_PER_SEC(60)));
	m_pkEndEvent = NULL;
	m_pkTimeoutEvent = NULL;
	m_pkResetFlagEvent = NULL;
	m_bTimeout = false;
	m_dwStartTime = get_dword_time();
	m_bEnded = false;

	if (GetType() == WAR_MAP_TYPE_FLAG)
	{
		AddFlagBase(0);
		AddFlagBase(1);
		AddFlag(0);
		AddFlag(1);
	}
}
开发者ID:adi97ida,项目名称:Server,代码行数:35,代码来源:war_map.cpp


示例7: SQLUpdateCommand

SQLUpdateCommand ::	SQLUpdateCommand( const string & name,
										const string & desc )
		: SQLCommand( name, desc, UPD_HELP ) {

	AddFlag( ALib::CommandLineFlag( FLAG_COLS, true, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_WHERE, true, 1 ) );
}
开发者ID:darrennolan,项目名称:csvfix,代码行数:7,代码来源:csved_sql.cpp


示例8: Command

ExcludeCommand ::ExcludeCommand( const string & name,
								const string & desc )
		: Command( name, desc, EXCL_HELP ), mReverse( false ) {

	AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_REVCOLS, false, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_IF, false, 1 ) );
}
开发者ID:darrennolan,项目名称:csvfix,代码行数:8,代码来源:csved_exclude.cpp


示例9: RemoveNewlineCommand

RemoveNewlineCommand :: RemoveNewlineCommand( const string & name,
												const string & desc )
		: Command( name, desc, RMNEW_HELP ), mSep( "" ) {

	AddFlag( ALib::CommandLineFlag( FLAG_STR, false, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_EXCLNL, false, 0 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1 ) );
}
开发者ID:darrennolan,项目名称:csvfix,代码行数:8,代码来源:csved_rmnewline.cpp


示例10: Command

ShuffleCommand ::ShuffleCommand( const string & name,
                                 const string & desc )
    : Command( name, desc, SHUFFLE_HELP ) {

    AddFlag( ALib::CommandLineFlag( FLAG_NUM, false, 1 ) );
    AddFlag( ALib::CommandLineFlag( FLAG_RSEED, false, 1 ) );
    AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1 ) );
}
开发者ID:moissinac,项目名称:csvfix,代码行数:8,代码来源:csved_shuffle.cpp


示例11: FileInfoCommand

FileInfoCommand :: FileInfoCommand( const string & name,
								const string & desc )
		: Command( name, desc, INFO_HELP  ),
			mBasename( false ), mTwoCols( false ) {

	AddFlag( ALib::CommandLineFlag( FLAG_TWOC, false, false ) );
	AddFlag( ALib::CommandLineFlag( FLAG_BASEN, false, false ) );
}
开发者ID:bminossi,项目名称:csvfix,代码行数:8,代码来源:csved_fileinfo.cpp


示例12: EvalCommand

EvalCommand ::	EvalCommand( const string & name,
									 const string & desc )
		: Command( name, desc, EVAL_HELP ), mDiscardInput( false ) {
		AddFlag( ALib::CommandLineFlag( FLAG_EXPR, false, 1, true ) );
		AddFlag( ALib::CommandLineFlag( FLAG_REMOVE, false, 1, true ) );
		AddFlag( ALib::CommandLineFlag( FLAG_DISCARD, false, 0, true) );
		AddFlag( ALib::CommandLineFlag( FLAG_IF, false, 1, true) );
}
开发者ID:bminossi,项目名称:csvfix,代码行数:8,代码来源:csved_eval.cpp


示例13: DSVReadCommand

DSVReadCommand :: DSVReadCommand( const string & name,
                                  const string & desc )
    : DSVBase( name, desc, DSVR_HELP ), mIsCSV( false ), mCollapseSep( false ) {

    AddFlag( ALib::CommandLineFlag( FLAG_CSV, false, 0 ) );
    AddFlag( ALib::CommandLineFlag( FLAG_CMULTI, false, 0 ) );

}
开发者ID:purinda,项目名称:csvfix,代码行数:8,代码来源:csved_dsv.cpp


示例14: AsciiTableCommand

AsciiTableCommand :: AsciiTableCommand( const string & name,
								const string & desc )
		: Command( name, desc, ATABLE_HELP ), mUseLineSep( false ) {

	AddFlag( ALib::CommandLineFlag( FLAG_HEADER, false, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_RALIGN, false, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_SEP, false, 0 ) );
}
开发者ID:darrennolan,项目名称:csvfix,代码行数:8,代码来源:csved_atable.cpp


示例15: CallCommand

CallCommand :: CallCommand( const string & name, const string & desc )
				: Command( name, desc, CALL_HELP ),
					mOutBufSize( DEF_OUTBUF_SIZE ) {

	AddFlag( ALib::CommandLineFlag( FLAG_DLL, true, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_FUNC, true, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_BSIZE, false, 1 ) );
}
开发者ID:bminossi,项目名称:csvfix,代码行数:9,代码来源:csved_call.cpp


示例16: TrimCommand

TrimCommand ::	TrimCommand( const string & name,
                             const string & desc )
    : Command( name, desc, TRIM_HELP ) {

    AddFlag( ALib::CommandLineFlag( FLAG_COLS, false, 1 ) );
    AddFlag( ALib::CommandLineFlag( FLAG_TRLEAD, false, 0 ) );
    AddFlag( ALib::CommandLineFlag( FLAG_TRTRAIL, false, 0 ) );
    AddFlag( ALib::CommandLineFlag( FLAG_WIDTH, false, 1 ) );
}
开发者ID:purinda,项目名称:csvfix,代码行数:9,代码来源:csved_trim.cpp


示例17: PivotCommand

PivotCommand :: PivotCommand( const string & name,
								const string & desc )
		: Command( name, desc, PIVOT_HELP ) {

	AddFlag( ALib::CommandLineFlag( FLAG_ACTION, true, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_COL, true, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_ROW, true, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_FACT, true, 1 ) );

}
开发者ID:bminossi,项目名称:csvfix,代码行数:10,代码来源:csved_pivot.cpp


示例18: PickDefaultSpawnTeam

//-----------------------------------------------------------------------------
// Purpose: Sets HL2 specific defaults.
//-----------------------------------------------------------------------------
void CHL2MP_Player::Spawn(void)
{
#ifdef GE_DLL
    m_bSpawnInterpCounter = !m_bSpawnInterpCounter;
    BaseClass::Spawn();
#else
    m_flNextModelChangeTime = 0.0f;
    m_flNextTeamChangeTime = 0.0f;

    PickDefaultSpawnTeam();

    BaseClass::Spawn();

    if ( !IsObserver() )
    {
        pl.deadflag = false;
        RemoveSolidFlags( FSOLID_NOT_SOLID );

        RemoveEffects( EF_NODRAW );

        GiveDefaultItems();
    }

    RemoveEffects( EF_NOINTERP );

    m_nRenderFX = kRenderNormal;

    m_Local.m_iHideHUD = 0;

    AddFlag(FL_ONGROUND); // set the player on the ground at the start of the round.

    m_impactEnergyScale = HL2MPPLAYER_PHYSDAMAGE_SCALE;

    if ( HL2MPRules()->IsIntermission() )
    {
        AddFlag( FL_FROZEN );
    }
    else
    {
        RemoveFlag( FL_FROZEN );
    }

    m_bSpawnInterpCounter = !m_bSpawnInterpCounter;

    m_Local.m_bDucked = false;

    SetPlayerUnderwater(false);

    m_bReady = false;
#endif
    //Tony; do the spawn animevent
    DoAnimationEvent( PLAYERANIMEVENT_SPAWN );

    SetContextThink( &CHL2MP_Player::HL2MPPushawayThink, gpGlobals->curtime + PUSHAWAY_THINK_INTERVAL, HL2MP_PUSHAWAY_THINK_CONTEXT );
}
开发者ID:Entropy-Soldier,项目名称:ges-legacy-code,代码行数:58,代码来源:hl2mp_player.cpp


示例19: Precache

//------------------------------------------------------------------------------
// Purpose :
// Input   :
// Output  :
// Notes   : Have your derived Helicopter's Spawn() function call this one FIRST
//------------------------------------------------------------------------------
void CBaseHelicopter::Spawn( void )
{
	Precache( );

	SetSolid( SOLID_BBOX );
	SetMoveType( MOVETYPE_STEP );
	AddFlag( FL_FLY );

	m_lifeState			= LIFE_ALIVE;

	// motor
	//******
	// All of this stuff is specific to the individual type of aircraft. Handle it yourself.
	//******
	//	m_iAmmoType = g_pGameRules->GetAmmoDef()->Index("MediumRound"); 
	//	SetModel( "models/attack_helicopter.mdl" );
	//	UTIL_SetSize( this, Vector( -32, -32, -64 ), Vector( 32, 32, 0 ) );
	//	UTIL_SetOrigin( this, GetLocalOrigin() );
	//	m_iHealth = 100;
	//	m_flFieldOfView = -0.707; // 270 degrees
	//	InitBoneControllers();
	//	m_iRockets			= 10;
	//	Get the rotor sound started up.

	// This base class assumes the helicopter has no guns or missiles. 
	// Set the appropriate flags in your derived class' Spawn() function.
	m_fHelicopterFlags &= ~BITS_HELICOPTER_MISSILE_ON;
	m_fHelicopterFlags &= ~BITS_HELICOPTER_GUN_ON;

	m_pRotorSound = NULL;
	m_pRotorBlast = NULL;

	m_flCycle = 0;
	ResetSequenceInfo();

	AddFlag( FL_NPC );

	m_flMaxSpeed = BASECHOPPER_MAX_SPEED;
	m_flMaxSpeedFiring = BASECHOPPER_MAX_FIRING_SPEED;
	m_takedamage = DAMAGE_AIM;

	// Don't start up if the level designer has asked the 
	// helicopter to start disabled.
	if ( !(m_spawnflags & SF_AWAITINPUT) )
	{
		Startup();
		SetNextThink( gpGlobals->curtime + 1.0f );
	}

	InitPathingData( BASECHOPPER_LEAD_DISTANCE, BASECHOPPER_MIN_CHASE_DIST_DIFF, BASECHOPPER_AVOID_DIST );

	// Setup collision hull
	ExpandBBox( m_cullBoxMins, m_cullBoxMaxs );
	AddSolidFlags( FSOLID_CUSTOMRAYTEST | FSOLID_CUSTOMBOXTEST );
}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:61,代码来源:cbasehelicopter.cpp


示例20: SQLCommand

SQLCommand :: SQLCommand( const string & name,
							const string & desc,
							const string & help )
	: Command( name, desc, help ), mQuoteNulls(false) {
	AddFlag( ALib::CommandLineFlag( FLAG_NOQUOTE, false, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_QNULLS, false, 0 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_TABLE, true, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_SQLSEP, false, 1 ) );
	AddFlag( ALib::CommandLineFlag( FLAG_ENULLS, false, 0 ) );

}
开发者ID:darrennolan,项目名称:csvfix,代码行数:11,代码来源:csved_sql.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AddFrame函数代码示例发布时间:2022-05-30
下一篇:
C++ AddFile函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap