diff options
| author | Narendra Umate <[email protected]> | 2013-12-08 01:27:41 -0800 |
|---|---|---|
| committer | Narendra Umate <[email protected]> | 2013-12-08 01:27:41 -0800 |
| commit | 4fa56874ba1557274c10077bf8386ece4c61dbd6 (patch) | |
| tree | e2d336604e960b548e996d2e7dcfc5a1e1401b9e /mp/src/game/server/trigger_area_capture.cpp | |
| parent | Added DS_Store to .gitignore. (diff) | |
| parent | Make libSDL2.so/dylib into symlinks. (diff) | |
| download | source-sdk-2013-4fa56874ba1557274c10077bf8386ece4c61dbd6.tar.xz source-sdk-2013-4fa56874ba1557274c10077bf8386ece4c61dbd6.zip | |
Merge remote-tracking branch 'upstream/master'
Reverted .gitattributes xcode_ccache_wrapper change. Fixed line endings
for .gitignore and .gitattributes.
Diffstat (limited to 'mp/src/game/server/trigger_area_capture.cpp')
| -rw-r--r-- | mp/src/game/server/trigger_area_capture.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/mp/src/game/server/trigger_area_capture.cpp b/mp/src/game/server/trigger_area_capture.cpp index 177e7701..2839200b 100644 --- a/mp/src/game/server/trigger_area_capture.cpp +++ b/mp/src/game/server/trigger_area_capture.cpp @@ -43,7 +43,6 @@ BEGIN_DATADESC(CTriggerAreaCapture) // DEFINE_FIELD( m_TeamData, CUtlVector < perteamdata_t > ), // DEFINE_FIELD( m_Blockers, CUtlVector < blockers_t > ), // DEFINE_FIELD( m_bActive, FIELD_BOOLEAN ), -// DEFINE_FIELD( m_iAreaIndex, FIELD_INTEGER ), // DEFINE_FIELD( m_hPoint, CHandle < CTeamControlPoint > ), // DEFINE_FIELD( m_bRequiresObject, FIELD_BOOLEAN ), // DEFINE_FIELD( m_iCapAttemptNumber, FIELD_INTEGER ), @@ -96,8 +95,6 @@ void CTriggerAreaCapture::Spawn( void ) Precache(); - m_iAreaIndex = -1; - SetTouch ( &CTriggerAreaCaptureShim::Touch ); SetThink( &CTriggerAreaCapture::CaptureThink ); SetNextThink( gpGlobals->curtime + AREA_THINK_TIME ); @@ -167,14 +164,6 @@ void CTriggerAreaCapture::Precache( void ) //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- -void CTriggerAreaCapture::SetAreaIndex( int index ) -{ - m_iAreaIndex = index; -} - -//----------------------------------------------------------------------------- -// Purpose: -//----------------------------------------------------------------------------- bool CTriggerAreaCapture::IsActive( void ) { return !m_bDisabled; @@ -231,7 +220,7 @@ void CTriggerAreaCapture::StartTouch(CBaseEntity *pOther) //----------------------------------------------------------------------------- void CTriggerAreaCapture::EndTouch(CBaseEntity *pOther) { - if ( PassesTriggerFilters(pOther) && m_hPoint ) + if ( IsTouching( pOther ) && m_hPoint ) { IGameEvent *event = gameeventmanager->CreateEvent( "controlpoint_endtouch" ); if ( event ) @@ -274,8 +263,6 @@ void CTriggerAreaCapture::AreaTouch( CBaseEntity *pOther ) if ( !TeamplayGameRules()->PointsMayBeCaptured() ) return; - Assert( m_iAreaIndex != -1 ); - // dont touch for non-alive or non-players if( !pOther->IsPlayer() || !pOther->IsAlive() ) return; @@ -771,6 +758,8 @@ void CTriggerAreaCapture::StartCapture( int team, int capmode ) m_nCapturingTeam = team; + OnStartCapture( m_nCapturingTeam ); + UpdateNumPlayers(); if ( CaptureModeScalesWithPlayers() ) |