本文整理汇总了C++中CTeamControlPointMaster::NumPlayableControlPointRounds方法的典型用法代码示例。如果您正苦于以下问题:C++ CTeamControlPointMaster::NumPlayableControlPointRounds方法的具体用法?C++ CTeamControlPointMaster::NumPlayableControlPointRounds怎么用?C++ CTeamControlPointMaster::NumPlayableControlPointRounds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTeamControlPointMaster
的用法示例。
在下文中一共展示了CTeamControlPointMaster::NumPlayableControlPointRounds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: WatcherThink
//.........这里部分代码省略.........
{
// reset our alert flag
m_CPLinks[iCount].bAlertPlayed = false;
}
}
else
{
if ( m_flTrainDistanceFromStart < m_CPLinks[iCount].flDistanceFromStart && !m_CPLinks[iCount].bAlertPlayed )
{
m_CPLinks[iCount].bAlertPlayed = true;
bool bFinalPointInMap = false;
CTeamControlPoint *pCurrentPoint = m_CPLinks[iCount].hCP.Get();
CTeamControlPointMaster *pMaster = g_hControlPointMasters.Count() ? g_hControlPointMasters[0] : NULL;
if ( pMaster )
{
// if we're not playing mini-rounds
if ( !pMaster->PlayingMiniRounds() )
{
for ( int i = FIRST_GAME_TEAM ; i < MAX_CONTROL_POINT_TEAMS ; i++ )
{
if ( ObjectiveResource() && ObjectiveResource()->TeamCanCapPoint( pCurrentPoint->GetPointIndex(), i ) )
{
if ( pMaster->WouldNewCPOwnerWinGame( pCurrentPoint, i ) )
{
bFinalPointInMap = true;
}
}
}
}
else
{
// or this is the last round
if ( pMaster->NumPlayableControlPointRounds() == 1 )
{
CTeamControlPointRound *pRound = pMaster->GetCurrentRound();
if ( pRound )
{
for ( int i = FIRST_GAME_TEAM ; i < MAX_CONTROL_POINT_TEAMS ; i++ )
{
if ( ObjectiveResource() && ObjectiveResource()->TeamCanCapPoint( pCurrentPoint->GetPointIndex(), i ) )
{
if ( pRound->WouldNewCPOwnerWinGame( pCurrentPoint, i ) )
{
bFinalPointInMap = true;
}
}
}
}
}
}
}
PlayCaptureAlert( pCurrentPoint, bFinalPointInMap );
}
}
}
// check to see if we need to start or stop the alarm
if ( flDistanceToGoal <= TEAM_TRAIN_ALARM_DISTANCE )
{
if ( ObjectiveResource() )
{
ObjectiveResource()->SetTrackAlarm( GetTeamNumber(), true );
}