add source-sdk-2013

This commit is contained in:
nillerusr
2022-03-01 23:00:42 +03:00
parent 88b8830e8b
commit edc8d6c584
3288 changed files with 3731 additions and 1062455 deletions
+17 -10
View File
@@ -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