本文整理汇总了C++中EHANDLE::RemoveFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ EHANDLE::RemoveFlag方法的具体用法?C++ EHANDLE::RemoveFlag怎么用?C++ EHANDLE::RemoveFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EHANDLE
的用法示例。
在下文中一共展示了EHANDLE::RemoveFlag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PrescheduleThink
//.........这里部分代码省略.........
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
*/
{
// Grab the target
m_hContainer = m_hPickupTarget;
m_hPickupTarget = NULL;
m_iContainerMoveType = m_hContainer->GetMoveType();
// If the container has a physics object, move it to shadow
IPhysicsObject *pPhysicsObject = m_hContainer->VPhysicsGetObject();
if ( pPhysicsObject )
{
pPhysicsObject->SetShadow( Vector(1e4,1e4,1e4), AngularImpulse(1e4,1e4,1e4), false, false );
pPhysicsObject->UpdateShadow( GetAbsOrigin(), GetAbsAngles(), false, 0 );
}
int iIndex = 0;//LookupAttachment("Cargo");
/*
Vector vecOrigin;
QAngle vecAngles;
GetAttachment( iIndex, vecOrigin, vecAngles );
m_hContainer->SetAbsOrigin( vecOrigin );
m_hContainer->SetAbsAngles( vec3_angle );
*/
m_hContainer->SetAbsOrigin( GetAbsOrigin() );
m_hContainer->SetParent(this, iIndex);
m_hContainer->SetMoveType( MOVETYPE_PUSH );
m_hContainer->RemoveFlag( FL_ONGROUND );
m_hContainer->Relink();
m_hContainer->SetAbsAngles( vec3_angle );
m_OnFinishedPickup.FireOutput( this, this );
m_iLandState = LANDING_NO;
}
}
}
DoRotorWash();
}
break;
}
DoCombatStuff();
if ( GetActivity() != GetIdealActivity() )
{
//Msg( "setactivity" );
SetActivity( GetIdealActivity() );
}
}