You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Imminent fixes for bugs found on master branch (#512)
* The vanilla level checks define for Yoshi is inverted, causing him to require 120 stars when it is off and appear at 0 stars when it's on * The downwarp fix results in Mario levitating in midair when grabbing Bowser midair. While downwarps should still be fixed, the change should be reverted immediately until a better fix is made. * Some checks of Mario's floor class were using the wrong defines, which can lead to unexpected behavior in the event anyone wants to reorder surface types. By default the SURFACE_CLASS_SLIPPERY and SURFACE_SLIPPERY defines have the same value, which is why this mistake is hard to notice. * The firsty frames define was implemented poorly, not allowing for vanilla firsty behavior no matter what the values were set to. This has been reverted, while avoiding the UB in the original vanilla code. * Removed the ledge grab changes that fix QSLGs and change the false ledgegrab define since Arceveti wanted to in his PR
This commit is contained in:
@@ -14,7 +14,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
|
||||
- **ArcticJaguar725**: Most audio configuration and layout changes, colored ia4 text, floombas, various bugfixes, and more
|
||||
- **CowQuack**: Adjustable skybox sizes, area-specific skybox function
|
||||
- **thecozies**: Water surface types, general maintenance, and time
|
||||
- **MrComit**: General use object defines, JUMP_KICK_FIX, LEDGE_GRABS_CHECK_SLOPE_ANGLE
|
||||
- **MrComit**: General use object defines, JUMP_KICK_FIX
|
||||
- **aglab2**: Bugfixes (particularly puppycam), refactor stuff
|
||||
- **someone2639**: math.s and crash screen disam, stack trace, map packing, shiftable segments 2, S2DEX engine
|
||||
- **Arthurtilly**: Platform Displacement 2
|
||||
@@ -61,7 +61,6 @@ Thanks to Frame#5375 and AloXado320 for also helping with silhouette stuff
|
||||
- Toggle to disable fall damage and the fall damage sound *
|
||||
- Nonstop stars *
|
||||
- Removed course-specific camera processing *
|
||||
- You can increase the number of frames that you have to perform a firsty *
|
||||
- Ability to set Mario's movement speed when hanging from a ceiling *
|
||||
- Tighter hanging controls (Mario will face the direction of the analog stick directly while hanging from a ceiling) *
|
||||
- reonucam3: custom camera by Reonu. This is included as a .patch file in the enhancements folder, you need to apply it if you want this camera.
|
||||
|
||||
@@ -68,14 +68,11 @@
|
||||
// Allows Mario to grab hangable ceilings from any state.
|
||||
#define HANGING_FIX
|
||||
|
||||
// The last frame after hitting a wall that will be considered a firsty when wallkicking.
|
||||
#define FIRSTY_LAST_FRAME 1
|
||||
|
||||
// The maximum angle the player can wall kick, in degrees. 0..90. To allow 45 degree wall kicks, you must supply `46` to allow 45 and under.
|
||||
#define WALL_KICK_DEGREES 45
|
||||
|
||||
// This is vanilla behavior, disable it to allow ledge grabbing regardless of floor pitch.
|
||||
// #define LEDGE_GRABS_CHECK_SLOPE_ANGLE
|
||||
// Makes Mario unable to ledge grab steep slopes to prevent false ledge grabs.
|
||||
#define DONT_LEDGE_GRAB_STEEP_SLOPES
|
||||
|
||||
// Disables BLJs and crushes SimpleFlips's dreams.
|
||||
// #define DISABLE_BLJ
|
||||
|
||||
@@ -244,7 +244,7 @@ enum SurfaceTypes {
|
||||
|
||||
enum SurfaceClass {
|
||||
SURFACE_CLASS_DEFAULT,
|
||||
SURFACE_CLASS_VERY_SLIPPERY = 0x0013,
|
||||
SURFACE_CLASS_VERY_SLIPPERY,
|
||||
SURFACE_CLASS_SLIPPERY,
|
||||
SURFACE_CLASS_NOT_SLIPPERY
|
||||
};
|
||||
|
||||
@@ -704,7 +704,7 @@ s32 find_water_level(s32 x, s32 z) { // TODO: Allow y pos
|
||||
|
||||
// If the location is within a water box and it is a water box.
|
||||
// Water is less than 50 val only, while above is gas and such.
|
||||
if (loX < x && x < hiX && loZ < z && z < hiZ && val < 50) {
|
||||
if (loX <= x && x <= hiX && loZ <= z && z <= hiZ && val < 50) {
|
||||
// Set the water height. Since this breaks, only return the first height.
|
||||
waterLevel = *p;
|
||||
break;
|
||||
|
||||
@@ -11,7 +11,7 @@ void bhv_yoshi_init(void) {
|
||||
o->oBuoyancy = 1.3f;
|
||||
o->oInteractionSubtype = INT_SUBTYPE_NPC;
|
||||
|
||||
#if defined(ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS) || defined(UNLOCK_ALL)
|
||||
#if !defined(ENABLE_VANILLA_LEVEL_SPECIFIC_CHECKS) || defined(UNLOCK_ALL)
|
||||
if (sYoshiDead == TRUE) {
|
||||
#else
|
||||
if ((save_file_get_total_star_count(gCurrSaveFileNum - 1, COURSE_NUM_TO_INDEX(COURSE_MIN), COURSE_NUM_TO_INDEX(COURSE_MAX)) < 120)
|
||||
|
||||
@@ -536,10 +536,10 @@ u32 mario_floor_is_slippery(struct MarioState *m) {
|
||||
}
|
||||
|
||||
switch (mario_get_floor_class(m)) {
|
||||
case SURFACE_VERY_SLIPPERY: normY = COS10; break;
|
||||
case SURFACE_SLIPPERY: normY = COS20; break;
|
||||
default: normY = COS38; break;
|
||||
case SURFACE_NOT_SLIPPERY: normY = 0.0f; break;
|
||||
case SURFACE_CLASS_VERY_SLIPPERY: normY = COS10; break;
|
||||
case SURFACE_CLASS_SLIPPERY: normY = COS20; break;
|
||||
default: normY = COS38; break;
|
||||
case SURFACE_CLASS_NOT_SLIPPERY: normY = 0.0f; break;
|
||||
}
|
||||
|
||||
return m->floor->normal.y <= normY;
|
||||
@@ -557,10 +557,10 @@ s32 mario_floor_is_slope(struct MarioState *m) {
|
||||
}
|
||||
|
||||
switch (mario_get_floor_class(m)) {
|
||||
case SURFACE_VERY_SLIPPERY: normY = COS5; break;
|
||||
case SURFACE_SLIPPERY: normY = COS10; break;
|
||||
default: normY = COS15; break;
|
||||
case SURFACE_NOT_SLIPPERY: normY = COS20; break;
|
||||
case SURFACE_CLASS_VERY_SLIPPERY: normY = COS5; break;
|
||||
case SURFACE_CLASS_SLIPPERY: normY = COS10; break;
|
||||
default: normY = COS15; break;
|
||||
case SURFACE_CLASS_NOT_SLIPPERY: normY = COS20; break;
|
||||
}
|
||||
|
||||
return m->floor->normal.y <= normY;
|
||||
@@ -584,10 +584,10 @@ s32 mario_floor_is_steep(struct MarioState *m) {
|
||||
// This does not matter in vanilla game practice.
|
||||
if (!mario_facing_downhill(m, FALSE)) {
|
||||
switch (mario_get_floor_class(m)) {
|
||||
case SURFACE_VERY_SLIPPERY: normY = COS15; break;
|
||||
case SURFACE_SLIPPERY: normY = COS20; break;
|
||||
default: normY = COS30; break;
|
||||
case SURFACE_NOT_SLIPPERY: normY = COS30; break;
|
||||
case SURFACE_CLASS_VERY_SLIPPERY: normY = COS15; break;
|
||||
case SURFACE_CLASS_SLIPPERY: normY = COS20; break;
|
||||
default: normY = COS30; break;
|
||||
case SURFACE_CLASS_NOT_SLIPPERY: normY = COS30; break;
|
||||
}
|
||||
|
||||
return m->floor->normal.y <= normY;
|
||||
|
||||
@@ -1273,7 +1273,7 @@ s32 act_air_hit_wall(struct MarioState *m) {
|
||||
mario_drop_held_object(m);
|
||||
}
|
||||
|
||||
if (++(m->actionTimer) <= FIRSTY_LAST_FRAME) {
|
||||
if (++(m->actionTimer) <= 2) {
|
||||
if (m->input & INPUT_A_PRESSED) {
|
||||
m->vel[1] = 52.0f;
|
||||
m->faceAngle[1] += 0x8000;
|
||||
@@ -1299,12 +1299,9 @@ s32 act_air_hit_wall(struct MarioState *m) {
|
||||
return set_mario_action(m, ACT_SOFT_BONK, 0);
|
||||
}
|
||||
|
||||
#if FIRSTY_LAST_FRAME > 1
|
||||
set_mario_animation(m, MARIO_ANIM_START_WALLKICK);
|
||||
m->marioObj->header.gfx.angle[1] = m->wallYaw;
|
||||
#endif
|
||||
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
s32 act_forward_rollout(struct MarioState *m) {
|
||||
|
||||
@@ -565,11 +565,9 @@ s32 act_ledge_grab(struct MarioState *m) {
|
||||
if (m->actionTimer < 10) {
|
||||
m->actionTimer++;
|
||||
}
|
||||
#ifdef LEDGE_GRABS_CHECK_SLOPE_ANGLE
|
||||
if (m->floor->normal.y < COS25) {
|
||||
return let_go_of_ledge(m);
|
||||
}
|
||||
#endif
|
||||
if (m->input & (INPUT_Z_PRESSED | INPUT_OFF_FLOOR)) {
|
||||
return let_go_of_ledge(m);
|
||||
}
|
||||
|
||||
@@ -259,10 +259,9 @@ s32 stationary_ground_step(struct MarioState *m) {
|
||||
if (takeStep) {
|
||||
stepResult = perform_ground_step(m);
|
||||
} else {
|
||||
// Hackersm64: this condition fixes potential downwarps
|
||||
if (m->pos[1] <= m->floorHeight + 160.0f) {
|
||||
m->pos[1] = m->floorHeight;
|
||||
}
|
||||
//! TODO - This is responsible for many stationary downwarps but is
|
||||
// important for stuff like catching Bowser in midair, figure out a good way to fix
|
||||
m->pos[1] = m->floorHeight;
|
||||
|
||||
vec3f_copy(marioObj->header.gfx.pos, m->pos);
|
||||
vec3s_set(marioObj->header.gfx.angle, 0, m->faceAngle[1], 0);
|
||||
@@ -404,8 +403,10 @@ struct Surface *check_ledge_grab(struct MarioState *m, struct Surface *prevWall,
|
||||
if (ledgeFloor == NULL
|
||||
|| (*ledgeFloor) == NULL
|
||||
|| ledgePos[1] < nextPos[1] + 100.0f
|
||||
#ifdef DONT_LEDGE_GRAB_STEEP_SLOPES
|
||||
|| (*ledgeFloor)->normal.y < COS25 // H64 TODO: check if floor is actually slippery
|
||||
|| SURFACE_IS_UNSAFE((*ledgeFloor)->type)) {
|
||||
#endif
|
||||
) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user