Add Infinite Boost cheat

This commit is contained in:
Kiloku 2024-12-25 11:58:05 -03:00 committed by Lywx
parent dc3e439c88
commit eb97ddbff8
4 changed files with 27 additions and 16 deletions

View File

@ -5069,6 +5069,9 @@ void Player_ArwingBoost(Player* player) {
sp28 = 1.5f; sp28 = 1.5f;
sp2C = 0.35f; sp2C = 0.35f;
} }
if (CVarGetInteger("gInfiniteBoost", 0)) {
sp28 = 0.0f;
}
player->sfx.boost = 0; player->sfx.boost = 0;
@ -5199,6 +5202,9 @@ void Player_ArwingBrake(Player* player) {
sp30 = 1.5f; sp30 = 1.5f;
sp34 = 0.35f; sp34 = 0.35f;
} }
if (CVarGetInteger("gInfiniteBoost", 0)) {
sp30 = 0.0f;
}
player->sfx.brake = false; player->sfx.brake = false;

View File

@ -1120,11 +1120,13 @@ void Tank_UpdateOnRails(Player* player) {
func_tank_80045348(player); func_tank_80045348(player);
if (!player->boostCooldown) { if (!player->boostCooldown) {
if (D_800C9F14 != 0) { if (D_800C9F14 != 0) {
if (!CVarGetInteger("gInfiniteBoost", 0)) {
if (D_800C9F14 >= 2) { if (D_800C9F14 >= 2) {
player->boostMeter += 2.0f; player->boostMeter += 2.0f;
} else { } else {
player->boostMeter += 1.0f; player->boostMeter += 1.0f;
} }
}
if (player->boostMeter > 90.0f) { if (player->boostMeter > 90.0f) {
player->boostMeter = 90.0f; player->boostMeter = 90.0f;
player->boostCooldown = true; player->boostCooldown = true;

View File

@ -1515,12 +1515,13 @@ void Aquas_BlueMarineBoost(Player* player) {
AUDIO_PLAY_SFX(NA_SE_MARINE_BOOST, player->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_MARINE_BOOST, player->sfxSource, 4);
} }
if (!CVarGetInteger("gInfiniteBoost", 0)) {
player->boostMeter += 3.0f; player->boostMeter += 3.0f;
if (player->boostMeter > 90.0f) { if (player->boostMeter > 90.0f) {
player->boostMeter = 90.0f; player->boostMeter = 90.0f;
player->boostCooldown = 1; player->boostCooldown = 1;
} }
}
player->boostSpeed += 2.0f; player->boostSpeed += 2.0f;
if (player->boostSpeed > 10.0f) { if (player->boostSpeed > 10.0f) {
player->boostSpeed = 10.0f; player->boostSpeed = 10.0f;
@ -1563,12 +1564,13 @@ void Aquas_BlueMarineBrake(Player* player) {
AUDIO_PLAY_SFX(NA_SE_MARINE_BRAKE, player->sfxSource, 4); AUDIO_PLAY_SFX(NA_SE_MARINE_BRAKE, player->sfxSource, 4);
} }
if (!CVarGetInteger("gInfiniteBoost", 0)) {
player->boostMeter += 3.0f; player->boostMeter += 3.0f;
if (player->boostMeter > 90.0f) { if (player->boostMeter > 90.0f) {
player->boostMeter = 90.0f; player->boostMeter = 90.0f;
player->boostCooldown = 1; player->boostCooldown = 1;
} }
}
player->boostSpeed -= 1.0f; player->boostSpeed -= 1.0f;
if (player->boostSpeed < -20.0f) { if (player->boostSpeed < -20.0f) {
player->boostSpeed = -20.0f; player->boostSpeed = -20.0f;

View File

@ -476,6 +476,7 @@ void DrawCheatsMenu() {
UIWidgets::CVarCheckbox("Invincible", "gInvincible"); UIWidgets::CVarCheckbox("Invincible", "gInvincible");
UIWidgets::CVarCheckbox("Unbreakable Wings", "gUnbreakableWings"); UIWidgets::CVarCheckbox("Unbreakable Wings", "gUnbreakableWings");
UIWidgets::CVarCheckbox("Infinite Bombs", "gInfiniteBombs"); UIWidgets::CVarCheckbox("Infinite Bombs", "gInfiniteBombs");
UIWidgets::CVarCheckbox("Infinite Boost/Brake", "gInfiniteBoost");
UIWidgets::CVarCheckbox("Hyper Laser", "gHyperLaser"); UIWidgets::CVarCheckbox("Hyper Laser", "gHyperLaser");
UIWidgets::CVarCheckbox("Self destruct button", "gHit64SelfDestruct", { UIWidgets::CVarCheckbox("Self destruct button", "gHit64SelfDestruct", {
.tooltip = "Press Down on the D-PAD to instantly self destruct." .tooltip = "Press Down on the D-PAD to instantly self destruct."