Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SSMT canceling #211

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/game/kart/KartMove.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1373,8 +1373,8 @@ void KartMove::calcAcceleration() {
m_processedSpeed = m_speed;

const auto *raceMgr = System::RaceManager::Instance();
if (state()->isTouchingGround() && !state()->isAccelerate() &&
raceMgr->isStageReached(System::RaceManager::Stage::Race)) {
if (!state()->isDisableBackwardsAccel() && state()->isTouchingGround() &&
!state()->isAccelerate() && raceMgr->isStageReached(System::RaceManager::Stage::Race)) {
calcDeceleration();
}

Expand Down
16 changes: 8 additions & 8 deletions source/game/kart/KartState.cc
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,6 @@ bool KartState::isOverZipper() const {
return m_bOverZipper;
}

bool KartState::isDisableBackwardsAccel() const {
return m_bDisableBackwardsAccel;
}

bool KartState::isZipperBoost() const {
return m_bZipperBoost;
}
Expand All @@ -577,6 +573,10 @@ bool KartState::isZipperTrick() const {
return m_bZipperTrick;
}

bool KartState::isDisableBackwardsAccel() const {
return m_bDisableBackwardsAccel;
}

bool KartState::isRespawnKillY() const {
return m_bRespawnKillY;
}
Expand Down Expand Up @@ -875,10 +875,6 @@ void KartState::setOverZipper(bool isSet) {
m_bOverZipper = isSet;
}

void KartState::setDisableBackwardsAccel(bool isSet) {
m_bDisableBackwardsAccel = isSet;
}

void KartState::setZipperBoost(bool isSet) {
m_bZipperBoost = isSet;
}
Expand All @@ -891,6 +887,10 @@ void KartState::setZipperTrick(bool isSet) {
m_bZipperTrick = isSet;
}

void KartState::setDisableBackwardsAccel(bool isSet) {
m_bDisableBackwardsAccel = isSet;
}

void KartState::setRespawnKillY(bool isSet) {
m_bRespawnKillY = isSet;
}
Expand Down
6 changes: 3 additions & 3 deletions source/game/kart/KartState.hh
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ public:
void setBoostOffroadInvincibility(bool isSet);
void setHalfPipeRamp(bool isSet);
void setOverZipper(bool isSet);
void setDisableBackwardsAccel(bool isSet);
void setZipperBoost(bool isSet);
void setZipperStick(bool isSet);
void setZipperTrick(bool isSet);
void setDisableBackwardsAccel(bool isSet);
void setRespawnKillY(bool isSet);
void setBurnout(bool isSet);
void setInRespawn(bool isSet);
Expand Down Expand Up @@ -127,9 +127,9 @@ public:
[[nodiscard]] bool isBoostOffroadInvincibility() const;
[[nodiscard]] bool isHalfPipeRamp() const;
[[nodiscard]] bool isOverZipper() const;
[[nodiscard]] bool isDisableBackwardsAccel() const;
[[nodiscard]] bool isZipperBoost() const;
[[nodiscard]] bool isZipperTrick() const;
[[nodiscard]] bool isDisableBackwardsAccel() const;
[[nodiscard]] bool isRespawnKillY() const;
[[nodiscard]] bool isBurnout() const;
[[nodiscard]] bool isZipperStick() const;
Expand Down Expand Up @@ -211,10 +211,10 @@ private:
bool m_bBoostOffroadInvincibility; ///< Set if we should ignore offroad slowdown this frame.
bool m_bHalfPipeRamp; ///< Set while colliding with zipper KCL.
bool m_bOverZipper; ///< Set while mid-air from a zipper.
bool m_bDisableBackwardsAccel; ///< Enforces a 20f delay when reversing after charging SSMT.
bool m_bZipperBoost; ///< Set when boosting after landing from a zipper.
bool m_bZipperStick; ///< Set while mid-air and still influenced by the zipper.
bool m_bZipperTrick; ///< Set while tricking mid-air from a zipper.
bool m_bDisableBackwardsAccel; ///< Enforces a 20f delay when reversing after charging SSMT.
bool m_bRespawnKillY; ///< Set while respawning to cap external velocity at 0.
bool m_bBurnout; ///< Set during a burnout on race start.
bool m_bTrickRot;
Expand Down
Loading