bool CheckTeam( CActor* mActor, CActor* pActor ) {
return ( ( mActor->GetTeamId( ) != pActor->GetTeamId( ) || pActor->GetTeamId( ) == 0 ) && ( pActor != mActor ) );
}
void TriggerBot( ) {
SSystemGlobalEnvironment* pEnv = SSystemGlobalEnvironment::Singleton( ); if ( !pEnv ) return;
CGame* pGame = pEnv->GetGame( ); if ( !pGame ) return;
CGameFramework* pGameFramework = pGame->GetGameFramework( ); if ( !pGameFramework ) return;
CActor* pActor = pGameFramework->GetClientActor( ); if ( !pActor ) return;
CItem* pItem = pActor->GetCurrentItem( ); if ( !pItem ) return;
CWeapon* pWeapon = pItem->GetWeapon( ); if ( !pWeapon ) return;
if ( GetKeyState( VK_CAPITAL ) ) {
if ( CActor* lActor = pGameFramework->GetActorSystem( )->GetActor( mAct->IsTriggerID( ) ) ) {
if ( !CheckTeam( lActor, pActor ) ) return;
pWeapon->StartFire( ), pWeapon->StopFire( );
}
}
}