vabold / Kinoko

A reimplementation of Mario Kart Wii's physics engine in C++
MIT License
46 stars 10 forks source link

Missing surface flag logic #149

Open vabold opened 2 months ago

vabold commented 2 months ago

This is the current logic:

    if (state()->isTouchingGround()) {
        m_offRoad = true;
        m_groundBoostPanelOrRamp = true;
    }

    m_suspBottomHeightNonSoftWall = 0.0f;
    m_rampBoost = false;
    m_offRoad = false;
    m_trickable = false;
    m_notTrickable = false;

This is what it should be:

    if (state()->isTouchingGround()) {
        m_groundOffRoad = m_offRoad;
        m_groundBoostPanelOrRamp = m_boostPanel;
    }

    m_suspBottomHeightNonSoftWall = 0.0f;
    m_rampBoost = false;
    m_offRoad = false;
    m_trickable = false;
    m_notTrickable = false;

We're missing m_groundOffRoad and m_boostPanel. Implementation will find all discrepancies with the surface flags and correct them.