modify this function void RLBotBot::RenderBallPredictions(const RLGSC::GameState& gs) {
    rlbot::ScopedRenderer renderer("ball_prediction_renderer");

    // Ensure the ballPredTracker is valid
    if (!ballPredTracker) {
        return;
    }

    // Update the ball prediction if needed
    ballPredTracker->Update();  // Ensure that the prediction data is up-to-date

    // Get the ball prediction data from RocketSim
    const auto& ballPredData = ballPredTracker->predData;

    // Check if we have prediction data
    if (ballPredData.empty()) {
        return;
    }

    // Decide how many points to render
    const int numPoints = 8;
    const int totalSlices = static_cast<int>(ballPredData.size());

    // Calculate the interval at which to sample the prediction data
    const int sliceStep = totalSlices / numPoints;

    // Collect points for rendering
    std::vector<rlbot::flat::Vector3> points;
    points.push_back({ gs.ball.pos.x, gs.ball.pos.y, gs.ball.pos.z }); // Start with current ball position

    for (int i = 0; i < numPoints; ++i) {
        int sliceIndex = (i + 1) * sliceStep;

        if (sliceIndex < totalSlices) {
            const auto& slice = ballPredData[sliceIndex];
            rlbot::flat::Vector3 point{
                slice.pos.x,
                slice.pos.y,
                slice.pos.z
            };
            points.push_back(point);
        }
        else {
            // If we don't have enough slices, break out of the loop
            break;
        }
    }

    // Render lines connecting the prediction points
    rlbot::Color predictionColor = { 255, 0, 0, 255 }; // Red color

    for (size_t i = 0; i < points.size() - 1; ++i) {
        renderer.DrawLine3D(predictionColor, points[i], points[i + 1]);
    }
} to correctly use the ballpred #pragma once
#include "../Arena/Arena.h"

RS_NS_START

// An external tool struct that predicts the ball of a given arena
struct BallPredTracker {
	Arena* ballPredArena;
	std::vector<BallState> predData;
	size_t numPredTicks;

	int lastUpdateTickCount;

	// arena: The arena you want to predict the ball for (BallPredTracker will make a copy of it without the cars)
	// You do not need to make another arena for BallPredTracker, it does that itself
	BallPredTracker(Arena* arena, size_t numPredTicks);
	~BallPredTracker();

	// No copying
	BallPredTracker(const BallPredTracker& other) = delete;
	BallPredTracker& operator=(const BallPredTracker& other) = delete;

	// Update the prediction data from the arena the ball is in, does not need to be called every tick
	// The arena is needed for the current ball state, as well as the tick count to determine time since last update
	void UpdatePredFromArena(Arena* arena);

	// An alternate version of UpdatePred which doesn't require the arena, 
	//	but instead you manually provide the current ball state and the ticks since this tracker was last updated
	void UpdatePredManual(const BallState& curBallState, int ticksSinceLastUpdate);

	// Forcefully re-predicts all ticks
	void ForceUpdateAllPred(const BallState& initialBallState);

	// Get the predicted ball state at a given future time delta
	BallState GetBallStateForTime(float predTime) const;
};

RS_NS_END