From beaae8ac45a2f322a792404092d4482065bef7ef Mon Sep 17 00:00:00 2001 From: Joe Ludwig Date: Tue, 3 Dec 2013 08:54:16 -0800 Subject: Updated the SDK with the latest code from the TF and HL2 branches * Adds support for Visual Studio 2012 and 2013 * VR Mode: . Switches from headtrack.dll to sourcevr.dll . Improved readability of the UI in VR . Removed the IPD calibration tool. TF2 will now obey the Oculus configuration file. Use the Oculus calibration tool in your SDK or install and run "OpenVR" under Tools in Steam to calibrate your IPD. . Added dropdown to enable VR mode in the Video options. Removed the -vr command line option. . Added the ability to switch in and out of VR mode without quitting the game . By default VR mode will run full screen. To switch back to a borderless window set the vr_force_windowed convar. . Added support for VR mode on Linux * Many assorted bug fixes and other changes from Team Fortress in various shared files --- mp/src/game/server/vote_controller.cpp | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'mp/src/game/server/vote_controller.cpp') diff --git a/mp/src/game/server/vote_controller.cpp b/mp/src/game/server/vote_controller.cpp index d052e0f9..316974ad 100644 --- a/mp/src/game/server/vote_controller.cpp +++ b/mp/src/game/server/vote_controller.cpp @@ -616,11 +616,7 @@ void CVoteController::VoteControllerThink( void ) } else { - // Don't track failed dedicated server votes - if ( m_iEntityHoldingVote != DEDICATED_SERVER ) - { - m_potentialIssues[m_iActiveIssueIndex]->OnVoteFailed(); - } + m_potentialIssues[m_iActiveIssueIndex]->OnVoteFailed( m_iEntityHoldingVote ); m_resetVoteTimer.Start( 5.0 ); } } @@ -895,34 +891,38 @@ const char *CBaseIssue::GetVotePassedString( void ) //----------------------------------------------------------------------------- // Purpose: Store failures to prevent vote spam //----------------------------------------------------------------------------- -void CBaseIssue::OnVoteFailed( void ) +void CBaseIssue::OnVoteFailed( int iEntityHoldingVote ) { - // Check for an existing match - for ( int index = 0; index < m_FailedVotes.Count(); index++ ) + // Don't track failed dedicated server votes + if ( BRecordVoteFailureEventForEntity( iEntityHoldingVote ) ) { - FailedVote *pFailedVote = m_FailedVotes[index]; - if ( Q_strcmp( pFailedVote->szFailedVoteParameter, GetDetailsString() ) == 0 ) + // Check for an existing match + for ( int index = 0; index < m_FailedVotes.Count(); index++ ) { - int nTime = sv_vote_failure_timer.GetInt(); + FailedVote *pFailedVote = m_FailedVotes[index]; + if ( Q_strcmp( pFailedVote->szFailedVoteParameter, GetDetailsString() ) == 0 ) + { + int nTime = sv_vote_failure_timer.GetInt(); #ifdef TF_DLL - if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() ) - { - nTime = sv_vote_failure_timer_mvm.GetInt(); - } + if ( TFGameRules() && TFGameRules()->IsMannVsMachineMode() ) + { + nTime = sv_vote_failure_timer_mvm.GetInt(); + } #endif // TF_DLL - pFailedVote->flLockoutTime = gpGlobals->curtime + nTime; + pFailedVote->flLockoutTime = gpGlobals->curtime + nTime; - return; + return; + } } - } - // Need to create a new one - FailedVote *pNewFailedVote = new FailedVote; - int iIndex = m_FailedVotes.AddToTail( pNewFailedVote ); - Q_strcpy( m_FailedVotes[iIndex]->szFailedVoteParameter, GetDetailsString() ); - m_FailedVotes[iIndex]->flLockoutTime = gpGlobals->curtime + sv_vote_failure_timer.GetFloat(); + // Need to create a new one + FailedVote *pNewFailedVote = new FailedVote; + int iIndex = m_FailedVotes.AddToTail( pNewFailedVote ); + Q_strcpy( m_FailedVotes[iIndex]->szFailedVoteParameter, GetDetailsString() ); + m_FailedVotes[iIndex]->flLockoutTime = gpGlobals->curtime + sv_vote_failure_timer.GetFloat(); + } } //----------------------------------------------------------------------------- @@ -939,7 +939,7 @@ bool CBaseIssue::CanTeamCallVote( int iTeam ) const bool CBaseIssue::CanCallVote( int iEntIndex, const char *pszDetails, vote_create_failed_t &nFailCode, int &nTime ) { // Automated server vote - don't bother testing against it - if ( iEntIndex == DEDICATED_SERVER ) + if ( !BRecordVoteFailureEventForEntity( iEntIndex ) ) return true; // Bogus player -- cgit v1.2.3