本文整理汇总了C++中EHANDLE::WorldAlignMaxs方法的典型用法代码示例。如果您正苦于以下问题:C++ EHANDLE::WorldAlignMaxs方法的具体用法?C++ EHANDLE::WorldAlignMaxs怎么用?C++ EHANDLE::WorldAlignMaxs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EHANDLE
的用法示例。
在下文中一共展示了EHANDLE::WorldAlignMaxs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SpawnEntity
//-----------------------------------------------------------------------------
// Purpose: Spawn an instance of the entity
//-----------------------------------------------------------------------------
void CEnvEntityMaker::SpawnEntity( void )
{
// Find our point_template
CPointTemplate *pTemplate = dynamic_cast<CPointTemplate *>(gEntList.FindEntityByName( NULL, STRING(m_iszTemplate), NULL ));
if ( !pTemplate )
{
Warning( "env_entity_maker %s failed to spawn template %s.\n", GetEntityName(), STRING(m_iszTemplate) );
return;
}
// Spawn our template
CUtlVector<CBaseEntity*> hNewEntities;
if ( !pTemplate->CreateInstance( GetAbsOrigin(), GetAbsAngles(), &hNewEntities ) )
return;
m_hCurrentInstance = hNewEntities[0];
// Assume it'll block us
m_hCurrentBlocker = m_hCurrentInstance;
m_vecBlockerOrigin = m_hCurrentBlocker->GetAbsOrigin();
// Store off the mins & maxs the first time we spawn
if ( m_vecEntityMins == vec3_origin )
{
m_vecEntityMins = m_hCurrentInstance->WorldAlignMins();
m_vecEntityMaxs = m_hCurrentInstance->WorldAlignMaxs();
}
// Fire our output
m_pOutputOnSpawned.FireOutput( this, this );
// Start thinking
if ( m_spawnflags & SF_ENTMAKER_AUTOSPAWN )
{
SetThink( &CEnvEntityMaker::CheckSpawnThink );
SetNextThink( gpGlobals->curtime + 0.5f );
}
}