当前位置: 首页>>代码示例>>C++>>正文


C++ CBaseCombatCharacter::IsInAVehicle方法代码示例

本文整理汇总了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;
}
开发者ID:Au-heppa,项目名称:swarm-sdk,代码行数:15,代码来源:pointteleport.cpp

示例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;
}
开发者ID:SizzlingStats,项目名称:hl2sdk-ob-valve,代码行数:17,代码来源:ai_behavior_passenger_zombie.cpp

示例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 );
}
开发者ID:Cre3per,项目名称:hl2sdk-csgo,代码行数:17,代码来源:ai_scriptconditions.cpp


注:本文中的CBaseCombatCharacter::IsInAVehicle方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。