//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CPointDevShotCamera::DevShotThink_Setup( void ) { // Move the player to the devshot camera CBasePlayer *pPlayer = UTIL_GetLocalPlayerOrListenServerHost(); if ( !pPlayer ) return; // Hide stuff engine->ClientCommand( pPlayer->edict(), "developer 0" ); engine->ClientCommand( pPlayer->edict(), "cl_drawhud 0" ); engine->ClientCommand( pPlayer->edict(), "sv_cheats 1" ); engine->ClientCommand( pPlayer->edict(), "god" ); engine->ClientCommand( pPlayer->edict(), "notarget" ); pPlayer->AddSolidFlags( FSOLID_NOT_SOLID ); pPlayer->EnableControl(FALSE); pPlayer->SetViewEntity( this ); pPlayer->SetFOV( this, m_iFOV ); // Hide the player's viewmodel if ( pPlayer->GetActiveWeapon() ) { pPlayer->GetActiveWeapon()->AddEffects( EF_NODRAW ); } DispatchUpdateTransmitState(); // Now take the shot next frame SetThink( &CPointDevShotCamera::DevShotThink_TakeShot ); SetNextThink( gpGlobals->curtime ); }