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


C++ CBaseMonster::ReportAIState方法代码示例

本文整理汇总了C++中CBaseMonster::ReportAIState方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseMonster::ReportAIState方法的具体用法?C++ CBaseMonster::ReportAIState怎么用?C++ CBaseMonster::ReportAIState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBaseMonster的用法示例。


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

示例1: CheatImpulseCommands

//=========================================================
//=========================================================
void CBasePlayer::CheatImpulseCommands( int iImpulse )
{
	if( !UTIL_CheatsAllowed() )
	{
		return;
	}

	switch( iImpulse )
	{
	case 76:
		{
			if( !g_bPrecacheGrunt )
			{
				g_bPrecacheGrunt = true;
				ALERT( at_console, "You must now restart to use Grunt-o-matic.\n" );
			}
			else
			{
				UTIL_MakeVectors( Vector( 0, GetViewAngle().y, 0 ) );
				Create( "monster_human_grunt", GetAbsOrigin() + gpGlobals->v_forward * 128, GetAbsAngles() );
			}
			break;
		}

	case 101:
		{
			gEvilImpulse101 = true;
			GiveNamedItem( "item_suit" );
			GiveNamedItem( "item_battery" );
			GiveNamedItem( "weapon_crowbar" );
			GiveNamedItem( "weapon_9mmhandgun" );
			GiveNamedItem( "ammo_9mmclip" );
			GiveNamedItem( "weapon_shotgun" );
			GiveNamedItem( "ammo_buckshot" );
			GiveNamedItem( "weapon_9mmAR" );
			GiveNamedItem( "ammo_9mmAR" );
			GiveNamedItem( "ammo_ARgrenades" );
			GiveNamedItem( "weapon_handgrenade" );
			GiveNamedItem( "weapon_tripmine" );

			GiveNamedItem( "weapon_357" );
			GiveNamedItem( "ammo_357" );
			GiveNamedItem( "weapon_crossbow" );
			GiveNamedItem( "ammo_crossbow" );
			GiveNamedItem( "weapon_egon" );
			GiveNamedItem( "weapon_gauss" );
			GiveNamedItem( "ammo_gaussclip" );
			GiveNamedItem( "weapon_rpg" );
			GiveNamedItem( "ammo_rpgclip" );
			GiveNamedItem( "weapon_satchel" );
			GiveNamedItem( "weapon_snark" );
			GiveNamedItem( "weapon_hornetgun" );

#if USE_OPFOR
			GiveNamedItem( "weapon_knife" );
			GiveNamedItem( "weapon_pipewrench" );
			GiveNamedItem( "weapon_grapple" );
			GiveNamedItem( "weapon_eagle" );
			GiveNamedItem( "weapon_m249" );
			GiveNamedItem( "weapon_displacer" );
			GiveNamedItem( "weapon_sniperrifle" );
			GiveNamedItem( "weapon_sporelauncher" );
			GiveNamedItem( "weapon_shockrifle" );
			GiveNamedItem( "ammo_556" );
			GiveNamedItem( "ammo_762" );
#endif

			gEvilImpulse101 = false;
			break;
		}

	case 102:
		{
			// Gibbage!!!
			CGib::SpawnRandomGibs( this, 1, 1 );
			break;
		}

	case 103:
		{
			// What the hell are you doing?
			auto pEntity = UTIL_FindEntityForward( this );
			if( pEntity )
			{
				CBaseMonster *pMonster = pEntity->MyMonsterPointer();
				if( pMonster )
					pMonster->ReportAIState();
			}
			break;
		}

	case 104:
		{
			// Dump all of the global state varaibles (and global entity names)
			gGlobalState.DumpGlobals();
			break;
		}

//.........这里部分代码省略.........
开发者ID:oskarlh,项目名称:HLEnhanced,代码行数:101,代码来源:CBasePlayer.frame.cpp


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