本文整理汇总了C++中EHANDLE::SetGroundEntity方法的典型用法代码示例。如果您正苦于以下问题:C++ EHANDLE::SetGroundEntity方法的具体用法?C++ EHANDLE::SetGroundEntity怎么用?C++ EHANDLE::SetGroundEntity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EHANDLE
的用法示例。
在下文中一共展示了EHANDLE::SetGroundEntity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PickupOrCatchObject
void CNPC_Dog::PickupOrCatchObject( const char *pAttachmentName )
{
if ( m_hPhysicsEnt )
{
InvalidateBoneCache();
int iAttachment = LookupAttachment( pAttachmentName );
if ( iAttachment == 0 )
iAttachment = m_iPhysGunAttachment;
// Move physobject to shadow
IPhysicsObject *pPhysicsObject = m_hPhysicsEnt->VPhysicsGetObject();
if ( pPhysicsObject )
{
pPhysicsObject->SetShadow( 1e4, 1e4, false, false );
pPhysicsObject->UpdateShadow( GetAbsOrigin(), GetAbsAngles(), false, 0 );
}
m_iContainerMoveType = m_hPhysicsEnt->GetMoveType();
m_hPhysicsEnt->SetMoveType( MOVETYPE_NONE );
m_hPhysicsEnt->SetParent( this, iAttachment );
m_hPhysicsEnt->SetLocalOrigin( vec3_origin );
m_hPhysicsEnt->SetLocalAngles( vec3_angle );
m_hPhysicsEnt->SetGroundEntity( NULL );
if ( m_hPhysicsEnt->GetOwnerEntity() == NULL )
m_hPhysicsEnt->SetOwnerEntity( this );
if ( pPhysicsObject )
pPhysicsObject->RecheckCollisionFilter();
m_bHasObject = true;
//Fire Output!
m_OnPickup.FireOutput( this, this );
}
}