#ifndef AIMBOT_HPP
#define AIMBOT_HPP

namespace cheat_interface
{
	class c_aimbot
	{
	public:

		void tick( );
		void run_aimbot( );

		void second_tick( );
		void run_trigger( );

		void update_function( std::uint32_t time, std::chrono::steady_clock::time_point& timestamp, std::function<void( )> task )
		{
			auto current_time = std::chrono::steady_clock::now( );
			if ( ( current_time - timestamp ) >= std::chrono::nanoseconds( time ) ) {
				task( );
				timestamp = current_time;
			}
		}

		void aim_lock( math::vector3 aim_location );
		auto find_look_at_rotation( math::vector3& start, math::vector3& target ) -> math::vector3;
		auto get_best_bone( int bone_id ) -> int;

		object::c_closest closest_actor{};
		math::vector3 predicted_ctx {};
	};

} inline std::shared_ptr<cheat_interface::c_aimbot> g_aimbot = std::make_shared<cheat_interface::c_aimbot>( );

#endif