本文整理汇总了C++中CBaseMultiplayerPlayer::StopScoringEscortPoints方法的典型用法代码示例。如果您正苦于以下问题:C++ CBaseMultiplayerPlayer::StopScoringEscortPoints方法的具体用法?C++ CBaseMultiplayerPlayer::StopScoringEscortPoints怎么用?C++ CBaseMultiplayerPlayer::StopScoringEscortPoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBaseMultiplayerPlayer
的用法示例。
在下文中一共展示了CBaseMultiplayerPlayer::StopScoringEscortPoints方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BreakCapture
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CTriggerAreaCapture::BreakCapture( bool bNotEnoughPlayers )
{
if( m_bCapturing )
{
// Remap team to get first game team = 1
switch ( m_nCapturingTeam - FIRST_GAME_TEAM+1 )
{
case 1:
m_OnBreakTeam1.FireOutput( this, this );
break;
case 2:
m_OnBreakTeam2.FireOutput( this, this );
break;
default:
Assert(0);
break;
}
m_BreakOutput.FireOutput(this,this);
m_bCapturing = false;
m_nCapturingTeam = TEAM_UNASSIGNED;
UpdateCappingTeam( TEAM_UNASSIGNED );
if ( bNotEnoughPlayers )
{
IncrementCapAttemptNumber();
}
SetCapTimeRemaining( 0 );
if( m_hPoint )
{
m_hPoint->CaptureEnd();
}
m_OnNumCappersChanged.Set( 0, this, this );
// tell all touching players to stop racking up capture points
CTeam *pTeam = GetGlobalTeam( m_nCapturingTeam );
if ( pTeam )
{
for ( int i=0;i<pTeam->GetNumPlayers();i++ )
{
CBaseMultiplayerPlayer *pPlayer = ToBaseMultiplayerPlayer( pTeam->GetPlayer(i) );
if ( pPlayer && IsTouching( pPlayer ) )
{
pPlayer->StopScoringEscortPoints();
}
}
}
}
}
示例2: EndTouch
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CTriggerAreaCapture::EndTouch(CBaseEntity *pOther)
{
if ( PassesTriggerFilters(pOther) && m_hPoint )
{
IGameEvent *event = gameeventmanager->CreateEvent( "controlpoint_endtouch" );
if ( event )
{
event->SetInt( "player", pOther->entindex() );
event->SetInt( "area", m_hPoint->GetPointIndex() );
gameeventmanager->FireEvent( event );
}
// incase we leave but the area keeps capturing
CBaseMultiplayerPlayer *pPlayer = ToBaseMultiplayerPlayer(pOther);
if ( pPlayer )
{
pPlayer->StopScoringEscortPoints();
}
}
BaseClass::EndTouch( pOther );
}
示例3: BreakCapture
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CTriggerAreaCapture::BreakCapture( bool bNotEnoughPlayers )
{
if( m_bCapturing )
{
// Remap team to get first game team = 1
switch ( m_nCapturingTeam - FIRST_GAME_TEAM+1 )
{
case 1:
m_OnBreakTeam1.FireOutput( this, this );
break;
case 2:
m_OnBreakTeam2.FireOutput( this, this );
break;
default:
Assert(0);
break;
}
m_BreakOutput.FireOutput(this,this);
m_bCapturing = false;
m_nCapturingTeam = TEAM_UNASSIGNED;
UpdateCappingTeam( TEAM_UNASSIGNED );
if ( bNotEnoughPlayers )
{
IncrementCapAttemptNumber();
}
SetCapTimeRemaining( 0 );
if( m_hPoint )
{
m_hPoint->CaptureEnd();
// The point reverted to it's previous owner.
IGameEvent *event = gameeventmanager->CreateEvent( "teamplay_capture_broken" );
if ( event )
{
event->SetInt( "cp", m_hPoint->GetPointIndex() );
event->SetString( "cpname", m_hPoint->GetName() );
event->SetFloat( "time_remaining", m_fTimeRemaining );
gameeventmanager->FireEvent( event );
}
}
SetNumCappers( 0 );
// tell all touching players to stop racking up capture points
CTeam *pTeam = GetGlobalTeam( m_nCapturingTeam );
if ( pTeam )
{
for ( int i=0;i<pTeam->GetNumPlayers();i++ )
{
CBaseMultiplayerPlayer *pPlayer = ToBaseMultiplayerPlayer( pTeam->GetPlayer(i) );
if ( pPlayer && IsTouching( pPlayer ) )
{
pPlayer->StopScoringEscortPoints();
}
}
}
}
}
示例4: EndCapture
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CTriggerAreaCapture::EndCapture( int team )
{
IncrementCapAttemptNumber();
// Remap team to get first game team = 1
switch ( team - FIRST_GAME_TEAM+1 )
{
case 1:
m_OnCapTeam1.FireOutput( this, this );
break;
case 2:
m_OnCapTeam2.FireOutput( this, this );
break;
default:
Assert(0);
break;
}
m_CapOutput.FireOutput(this,this);
int numcappers = 0;
int cappingplayers[MAX_AREA_CAPPERS];
GetNumCappingPlayers( team, numcappers, cappingplayers );
// Handle this before we assign the new team as the owner of this area
HandleRespawnTimeAdjustments( m_nOwningTeam, team );
m_nOwningTeam = team;
m_bCapturing = false;
m_nCapturingTeam = TEAM_UNASSIGNED;
SetCapTimeRemaining( 0 );
//there may have been more than one capper, but only report this one.
//he hasn't gotten points yet, and his name will go in the cap string if its needed
//first capper gets name sent and points given by flag.
//other cappers get points manually above, no name in message
//send the player in the cap string
if( m_hPoint )
{
OnEndCapture( m_nOwningTeam );
UpdateOwningTeam();
m_hPoint->SetOwner( m_nOwningTeam, true, numcappers, cappingplayers );
m_hPoint->CaptureEnd();
}
SetNumCappers( 0 );
// tell all touching players to stop racking up capture points
CTeam *pTeam = GetGlobalTeam( m_nCapturingTeam );
if ( pTeam )
{
for ( int i=0;i<pTeam->GetNumPlayers();i++ )
{
CBaseMultiplayerPlayer *pPlayer = ToBaseMultiplayerPlayer( pTeam->GetPlayer(i) );
if ( pPlayer && IsTouching( pPlayer ) )
{
pPlayer->StopScoringEscortPoints();
}
}
}
// play any special cap sounds
if ( TeamplayRoundBasedRules() )
{
TeamplayRoundBasedRules()->PlaySpecialCapSounds( m_nOwningTeam );
}
}