本文整理汇总了C++中CBaseCombatCharacter::IsInAVehicle方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseCombatCharacter::IsInAVehicle方法的具体用法?C++ CBaseCombatCharacter::IsInAVehicle怎么用?C++ CBaseCombatCharacter::IsInAVehicle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseCombatCharacter
的用法示例。
在下文中一共展示了CBaseCombatCharacter::IsInAVehicle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EntityMayTeleport
//-----------------------------------------------------------------------------
// Returns true if the entity may be teleported
//-----------------------------------------------------------------------------
bool CPointTeleport::EntityMayTeleport( CBaseEntity *pTarget )
{
if ( pTarget->GetMoveParent() != NULL )
{
// Passengers in a vehicle are allowed to teleport; their behavior handles it
CBaseCombatCharacter *pBCC = pTarget->MyCombatCharacterPointer();
if ( pBCC == NULL || ( pBCC != NULL && pBCC->IsInAVehicle() == false ) )
return false;
}
return true;
}
示例2: EnemyInVehicle
//-----------------------------------------------------------------------------
// Purpose: Determines if an enemy is inside a vehicle or not
// Output : Returns true if the enemy is outside the vehicle.
//-----------------------------------------------------------------------------
bool CAI_PassengerBehaviorZombie::EnemyInVehicle( void )
{
// Obviously they're not...
if ( GetOuter()->GetEnemy() == NULL )
return false;
// See if they're in a vehicle, currently
CBaseCombatCharacter *pCCEnemy = GetOuter()->GetEnemy()->MyCombatCharacterPointer();
if ( pCCEnemy && pCCEnemy->IsInAVehicle() )
return true;
return false;
}
示例3: EvalActorInVehicle
bool CAI_ScriptConditions::EvalActorInVehicle( const EvalArgs_t &args )
{
// We don't care
if ( m_fActorInVehicle == TRS_NONE )
return true;
if ( !args.pActor )
return true;
// Must be able to be in a vehicle at all
CBaseCombatCharacter *pBCC = args.pActor->MyCombatCharacterPointer();
if ( pBCC == NULL )
return false;
// Desired states must match
return ( !!pBCC->IsInAVehicle() == m_fActorInVehicle );
}