mNo edit summary
Tags: Manual revert Visual edit
mNo edit summary
Line 1: Line 1:
Remember Tool Assisted Freeruns? ( ͡• ͜ʖ ͡•)
Remember Tool Assisted Freeruns? ( ͡• ͜ʖ ͡•)<syntaxhighlight lang="c++">
// This is run once every frame generically
void Kart::KartMove::tryEndJumpPad() {
    KartState *state = mAccessor->getState();
    // Check to see if the flag for mushroom-specific jump pads is set
    if (state->mFlags & JUMP_PAD_MUSHROOM_TRIGGER) {
        // If so, check to see if we just landed on the ground
        if (state->mFlags & GROUND_START) {
            // Unset the mushroom-specific jump pad flag
            state->mFlags &= ~JUMP_PAD_MUSHROOM_TRIGGER;
            // The game falsely assumes that JUMP_PAD_FIXED_SPEED can only be set if the mushroom trigger is set
            // As we see above, this is not always the case, leading to the offroad glitch
            // Unset the fixed speed flag here and only here
            state->mFlags &= ~JUMP_PAD_FIXED_SPEED;
            // ...
        }
        // ...
    }


{{Infobox test|player_name=Boumi|nationality=French|years_active=2013 - 2018}}{{Video Embed|service=youtube|url=https://youtu.be/rwVL6NjQNwY|align=right}}
    // Check to see if we just landed on the ground and that the mushroom-specific jump pad flag is not set
    if (state->mFlags & GROUND_START !(state->mFlags & JUMP_PAD_MUSHROOM_TRIGGER)) {
        // ...
        // Unset the flag for jump pads
        state->mFlags &= ~JUMP_PAD;
    }
}
</syntaxhighlight>{{Infobox test|player_name=Boumi|nationality=French|years_active=2013 - 2018}}{{Video Embed|service=youtube|url=https://youtu.be/rwVL6NjQNwY|align=right}}