//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CBaseTFVehicle::SetupMove( CBasePlayer *player, CUserCmd *ucmd, IMoveHelper *pHelper, CMoveData *move )
{
	// animate + update attachment points
#ifdef CLIENT_DLL
	StudioFrameAdvance();
#else
	StudioFrameAdvance();
	// This calls StudioFrameAdvance, then we use the results from that to determine where to move.
	DispatchAnimEvents( this );
#endif
	
	CTFMoveData *pMoveData = (CTFMoveData*)move; 
	Assert( sizeof(VehicleBaseMoveData_t) <= pMoveData->VehicleDataMaxSize() );

	VehicleBaseMoveData_t *pVehicleData = (VehicleBaseMoveData_t*)pMoveData->VehicleData();
	pVehicleData->m_pVehicle = this;
}
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CObjectBaseMannedGun::SetupMove( CBasePlayer *pPlayer, CUserCmd *ucmd, IMoveHelper *pHelper, CMoveData *move )
{
	BaseClass::SetupMove( pPlayer, ucmd, pHelper, move );

	CTFMoveData *pMoveData = (CTFMoveData*)move; 
	Assert( sizeof(MannedPlasmagunData_t) <= pMoveData->VehicleDataMaxSize() );

	MannedPlasmagunData_t *pVehicleData = (MannedPlasmagunData_t*)pMoveData->VehicleData();
	pVehicleData->m_pVehicle = this;
	pVehicleData->m_flGunYaw = m_flGunYaw;
	pVehicleData->m_flGunPitch = m_flGunPitch;
	pVehicleData->m_flBarrelPitch = m_flBarrelPitch;
	pVehicleData->m_nMoveStyle = m_nMoveStyle;
	pVehicleData->m_flBarrelHeight = m_flBarrelHeight;
	pVehicleData->m_nBarrelPivotAttachment = m_nBarrelPivotAttachment;
	pVehicleData->m_nBarrelAttachment = m_nBarrelAttachment;
	pVehicleData->m_nStandAttachment = m_nStandAttachment;
}
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CObjectBaseMannedGun::FinishMove( CBasePlayer *player, CUserCmd *ucmd, CMoveData *move )
{
	BaseClass::FinishMove( player, ucmd, move );
	CTFMoveData *pMoveData = (CTFMoveData*)move; 
	Assert( sizeof(MannedPlasmagunData_t) <= pMoveData->VehicleDataMaxSize() );

	MannedPlasmagunData_t *pVehicleData = (MannedPlasmagunData_t*)pMoveData->VehicleData();
	m_flGunYaw = pVehicleData->m_flGunYaw;
	m_flGunPitch = pVehicleData->m_flGunPitch;
	m_flBarrelPitch = pVehicleData->m_flBarrelPitch;

	// Set the bone state..
	SetBoneController( 0, m_flGunYaw );
	SetBoneController( 1, m_flGunPitch );

	if ( m_nMoveStyle == MOVEMENT_STYLE_BARREL_PIVOT )
	{
		SetBoneController( 2, m_flBarrelPitch );
	}

	NetworkStateChanged();
}