diff --git a/game/server/team_control_point_master.cpp b/game/server/team_control_point_master.cpp index 8ad9796d..13ce5ba7 100644 --- a/game/server/team_control_point_master.cpp +++ b/game/server/team_control_point_master.cpp @@ -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 ); -*/ \ No newline at end of file +*/ diff --git a/game/server/team_control_point_master.h b/game/server/team_control_point_master.h index b6a7d35d..1b8e6b9f 100644 --- a/game/server/team_control_point_master.h +++ b/game/server/team_control_point_master.h @@ -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 );