God mode check for lava wall boost (#201)

* God mode check for lava wall boost

Thanks to Skeltan for finding it

* Prevent potential cutscene breaks
This commit is contained in:
Agent X 2022-09-26 22:10:39 -04:00 committed by GitHub
parent 3a9bd484ff
commit a97e7466bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 1 deletions

View file

@ -1543,7 +1543,6 @@ void update_mario_inputs(struct MarioState *m) {
debug_print_speed_action_normal(m); debug_print_speed_action_normal(m);
if (Cheats.enabled && Cheats.moonJump && m->controller->buttonDown & L_TRIG) { if (Cheats.enabled && Cheats.moonJump && m->controller->buttonDown & L_TRIG) {
set_mario_action(m, ACT_FREEFALL, 0);
m->faceAngle[1] = m->intendedYaw - approach_s32((s16)(m->intendedYaw - m->faceAngle[1]), 0, 0x800, 0x800); m->faceAngle[1] = m->intendedYaw - approach_s32((s16)(m->intendedYaw - m->faceAngle[1]), 0, 0x800, 0x800);
m->vel[1] = 30; m->vel[1] = 30;
} }

View file

@ -53,6 +53,7 @@ void play_knockback_sound(struct MarioState *m) {
#endif #endif
s32 lava_boost_on_wall(struct MarioState *m) { s32 lava_boost_on_wall(struct MarioState *m) {
if (Cheats.enabled && Cheats.godMode) { return; }
m->faceAngle[1] = atan2s(m->wallNormal[2], m->wallNormal[0]); m->faceAngle[1] = atan2s(m->wallNormal[2], m->wallNormal[0]);
if (m->forwardVel < 24.0f) { if (m->forwardVel < 24.0f) {