A few morw QoL tweaks

This commit is contained in:
Colton Rushton 2021-02-17 18:57:21 -04:00
parent 3123010733
commit 9128f60553
2 changed files with 7 additions and 12 deletions

View File

@ -786,6 +786,9 @@ void handle_menu_scrolling(s8 scrollDirection, s8 *currentIndex, s8 minIndex, s8
if (currentIndex[0] < maxIndex) {
play_sound(SOUND_MENU_CHANGE_SELECT, gDefaultSoundArgs);
currentIndex[0]++;
// this allows the pause menu arrow to loop when stick up is held down
} else if (currentIndex[0] >= maxIndex) {
currentIndex[0] = minIndex;
}
#endif
}
@ -803,6 +806,10 @@ void handle_menu_scrolling(s8 scrollDirection, s8 *currentIndex, s8 minIndex, s8
if (currentIndex[0] > minIndex) {
play_sound(SOUND_MENU_CHANGE_SELECT, gDefaultSoundArgs);
currentIndex[0]--;
// same as above, but with stick down instead of stick up
} else if (currentIndex[0] <= minIndex) {
play_sound(SOUND_MENU_CHANGE_SELECT, gDefaultSoundArgs);
currentIndex[0] = maxIndex;
}
#endif
}

View File

@ -392,23 +392,11 @@ u32 check_ledge_grab(struct MarioState *m, struct Surface *wall, Vec3f intendedP
// a higher ledge than expected (glitchy ledge grab)
ledgePos[0] = nextPos[0] - wall->normal.x * 60.0f;
ledgePos[2] = nextPos[2] - wall->normal.z * 60.0f;
#ifndef QOL_FIXES
ledgePos[1] = find_floor(ledgePos[0], nextPos[1] + 160.0f, ledgePos[2], &ledgeFloor);
#else
// start the search for floors at y instead of y + 160
ledgePos[1] = find_floor(ledgePos[0], nextPos[1], ledgePos[2], &ledgeFloor);
#endif
#ifndef QOL_FIXES
if (ledgePos[1] - nextPos[1] <= 100.0f) {
return 0;
}
#else
// to compensate, increase this check to 260 instead of 100
if (ledgePos[1] - nextPos[1] <= 260.0f) {
return 0;
}
#endif
vec3f_copy(m->pos, ledgePos);
m->floor = ledgeFloor;