本文整理汇总了C++中EHANDLE::SetModel方法的典型用法代码示例。如果您正苦于以下问题:C++ EHANDLE::SetModel方法的具体用法?C++ EHANDLE::SetModel怎么用?C++ EHANDLE::SetModel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EHANDLE
的用法示例。
在下文中一共展示了EHANDLE::SetModel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Spawn
//------------------------------------------------------------------------------
// Purpose :
// Input :
// Output :
//------------------------------------------------------------------------------
void CNPC_CombineDropship::Spawn( void )
{
Precache( );
SetModel( "models/combine_dropship.mdl" );
BaseClass::Spawn();
ExtractBbox( SelectHeaviestSequence( ACT_DROPSHIP_DEPLOY_IDLE ), m_cullBoxMins, m_cullBoxMaxs );
BaseClass::Spawn();
InitPathingData( DROPSHIP_LEAD_DISTANCE, DROPSHIP_MIN_CHASE_DIST_DIFF, DROPSHIP_AVOID_DIST );
// create the correct bin for the ship to carry
switch ( m_iCrateType )
{
case CRATE_ROLLER_HOPPER:
break;
case CRATE_SOLDIER:
m_hContainer = CreateEntityByName( "prop_dynamic" );
if ( m_hContainer )
{
m_hContainer->SetModel( "models/props_junk/trashdumpster02.mdl" );
m_hContainer->SetLocalOrigin( GetAbsOrigin() );
m_hContainer->SetLocalAngles( GetLocalAngles() );
m_hContainer->SetAbsAngles( GetAbsAngles() );
m_hContainer->SetParent(this, 0);
m_hContainer->SetOwnerEntity(this);
m_hContainer->SetSolid( SOLID_VPHYSICS );
m_hContainer->Spawn();
}
break;
case CRATE_NONE:
default:
break;
}
m_iHealth = 100;
m_flFieldOfView = 0.5; // 60 degrees
m_iContainerMoveType = MOVETYPE_NONE;
//InitBoneControllers();
InitCustomSchedules();
if ( m_hContainer )
{
SetIdealActivity( (Activity)ACT_DROPSHIP_FLY_IDLE_CARGO );
}
else
{
SetIdealActivity( (Activity)ACT_DROPSHIP_FLY_IDLE_EXAGG );
}
m_flMaxSpeed = DROPSHIP_MAX_SPEED;
m_flMaxSpeedFiring = BASECHOPPER_MAX_FIRING_SPEED;
m_hPickupTarget = NULL;
//!!!HACKHACK
// This tricks the AI code that constantly complains that the vehicle has no schedule.
SetSchedule( SCHED_IDLE_STAND );
m_iLandState = LANDING_NO;
}