本文整理汇总了C++中EHANDLE::Relink方法的典型用法代码示例。如果您正苦于以下问题:C++ EHANDLE::Relink方法的具体用法?C++ EHANDLE::Relink怎么用?C++ EHANDLE::Relink使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EHANDLE
的用法示例。
在下文中一共展示了EHANDLE::Relink方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrescheduleThink
//.........这里部分代码省略.........
// detach container from ship
if ( m_hContainer && m_leaveCrate )
{
m_hContainer->SetParent(NULL);
m_hContainer->SetMoveType( (MoveType_t)m_iContainerMoveType );
// If the container has a physics object, remove it's shadow
IPhysicsObject *pPhysicsObject = m_hContainer->VPhysicsGetObject();
if ( pPhysicsObject )
{
pPhysicsObject->RemoveShadowController();
}
m_hContainer = NULL;
}
}
}
break;
case LANDING_LIFTOFF:
{
// give us some clearance before changing back to larger hull -- keeps ship from getting stuck on
// things like the player, etc since we "pop" the hull...
if ( GetAltitude() > 120 )
{
m_OnFinishedDropoff.FireOutput( this, this );
m_iLandState = LANDING_NO;
// change bounding box back to normal ship hull
Vector vecBBMin, vecBBMax;
ExtractBbox( SelectHeaviestSequence( ACT_DROPSHIP_DEPLOY_IDLE ), vecBBMin, vecBBMax );
UTIL_SetSize( this, vecBBMin, vecBBMax );
Relink();
}
}
break;
case LANDING_SWOOPING:
{
// Did we lose our pickup target?
if ( !m_hPickupTarget )
{
m_iLandState = LANDING_NO;
}
else
{
// Decrease altitude and speed to hit the target point.
Vector vecToTarget = (GetDesiredPosition() - GetAbsOrigin());
float flDistance = vecToTarget.Length();
// Start cheating when we get near it
if ( flDistance < 50 )
{
/*
if ( flDistance > 10 )
{
// Cheat and ensure we touch the target
float flSpeed = GetAbsVelocity().Length();
Vector vecVelocity = vecToTarget;
VectorNormalize( vecVelocity );
SetAbsVelocity( vecVelocity * min(flSpeed,flDistance) );
}
else
*/
{