aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/server/team_train_watcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sp/src/game/server/team_train_watcher.cpp')
-rw-r--r--sp/src/game/server/team_train_watcher.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/sp/src/game/server/team_train_watcher.cpp b/sp/src/game/server/team_train_watcher.cpp
index 27d7a15c..cf6631fb 100644
--- a/sp/src/game/server/team_train_watcher.cpp
+++ b/sp/src/game/server/team_train_watcher.cpp
@@ -819,17 +819,15 @@ void CTeamTrainWatcher::WatcherActivate( void )
{
if ( m_hTrain )
{
- CTriggerAreaCapture *pArea = dynamic_cast<CTriggerAreaCapture *>( gEntList.FindEntityByClassname( NULL, "trigger_capture_area" ) );
- while( pArea )
+ for ( int i=0; i<ITriggerAreaCaptureAutoList::AutoList().Count(); ++i )
{
+ CTriggerAreaCapture *pArea = static_cast< CTriggerAreaCapture * >( ITriggerAreaCaptureAutoList::AutoList()[i] );
if ( pArea->GetParent() == m_hTrain.Get() )
{
// this is the capture area we care about, so let it know that we want updates on the capture numbers
pArea->SetTrainWatcher( this );
break;
}
-
- pArea = dynamic_cast<CTriggerAreaCapture *>( gEntList.FindEntityByClassname( pArea, "trigger_capture_area" ) );
}
}