mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-12 03:39:10 +00:00
add source-sdk-2013
This commit is contained in:
@@ -829,18 +829,25 @@ void C_ReplayCamera::SpecNextPlayer( bool bInverse )
|
||||
SetAutoDirector( false );
|
||||
}
|
||||
|
||||
void C_ReplayCamera::SpecPlayerByPredicate( const char *szSearch )
|
||||
void C_ReplayCamera::SpecNamedPlayer( const char *szPlayerName )
|
||||
{
|
||||
CBasePlayer *pPlayer = UTIL_PlayerByCommandArg( szSearch );
|
||||
if ( !pPlayer )
|
||||
return;
|
||||
for ( int index = 1; index <= gpGlobals->maxClients; ++index )
|
||||
{
|
||||
C_BasePlayer *pPlayer = UTIL_PlayerByIndex( index );
|
||||
|
||||
// only follow living players or dedicated spectators
|
||||
if ( pPlayer->IsObserver() && pPlayer->GetTeamNumber() != TEAM_SPECTATOR )
|
||||
return;
|
||||
if ( !pPlayer )
|
||||
continue;
|
||||
|
||||
SetPrimaryTarget( pPlayer->entindex() );
|
||||
return;
|
||||
if ( !FStrEq( szPlayerName, pPlayer->GetPlayerName() ) )
|
||||
continue;
|
||||
|
||||
// only follow living players or dedicated spectators
|
||||
if ( pPlayer->IsObserver() && pPlayer->GetTeamNumber() != TEAM_SPECTATOR )
|
||||
continue;
|
||||
|
||||
SetPrimaryTarget( index );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void C_ReplayCamera::FireGameEvent( IGameEvent * event)
|
||||
@@ -926,4 +933,4 @@ void C_ReplayCamera::SetAutoDirector( bool bActive )
|
||||
spec_autodirector.SetValue( bActive?1:0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user