mirror of
https://github.com/nillerusr/source-engine.git
synced 2025-05-19 17:56:26 +00:00
game: port FindControlPointRoundToPlay
This commit is contained in:
parent
d30c3c4cc0
commit
040e86b971
@ -461,6 +461,29 @@ void CTeamControlPointMaster::RegisterRoundBeingPlayed( void )
|
||||
}
|
||||
}
|
||||
|
||||
#if defined( TF_MOD )
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CTeamControlPointMaster::FindControlPointRoundToPlay( void )
|
||||
{
|
||||
for ( int i = 0 ; i < m_ControlPointRounds.Count() ; ++i )
|
||||
{
|
||||
CTeamControlPointRound *pRound = m_ControlPointRounds[i];
|
||||
|
||||
if ( pRound )
|
||||
{
|
||||
if ( pRound->IsPlayable() )
|
||||
{
|
||||
// we found one that's playable
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose:
|
||||
@ -1344,4 +1367,4 @@ void cc_PlayRound( const CCommand& args )
|
||||
}
|
||||
|
||||
static ConCommand playround( "playround", cc_PlayRound, "Play the selected round\n\tArgument: {round name given by \"listrounds\" command}", FCVAR_CHEAT );
|
||||
*/
|
||||
*/
|
||||
|
@ -129,6 +129,10 @@ public:
|
||||
void SetLastOwnershipChangeTime( float m_flTime ) { m_flLastOwnershipChangeTime = m_flTime; }
|
||||
float GetLastOwnershipChangeTime( void ) { return m_flLastOwnershipChangeTime; }
|
||||
|
||||
#if defined( TF_MOD )
|
||||
bool FindControlPointRoundToPlay( void ); // checks to see if there are any more rounds to play (but doesn't actually "get" one to play)
|
||||
#endif
|
||||
|
||||
private:
|
||||
void EXPORT CPMThink( void );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user