add NO_GETTING_BURIED define

This commit is contained in:
Reonu
2021-09-16 11:19:12 +03:00
parent 48a4d5a405
commit f9e2070eb1
3 changed files with 7 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ This is a fork of the ultrasm64 repo by CrashOveride which includes the followin
- Tighter hanging controls (mario will face the direction of the analog stick directly while hanging from a ceiling) *
- reonucam3: custom camera by me. This is included as a .patch file in the enhancements folder, you need to apply it if you want this camera.
This video shows a rundown of the features: https://youtu.be/TQNkznX9Z3k
- Ability to disable Mario getting suck in snow or sand
**Hacker QOL:**
- Global, non-level based, star IDs (off by default) *

View File

@@ -82,6 +82,8 @@
#define NO_FALL_DAMAGE
// Disables the scream that mario makes when falling off a great height (this is separate from actual fall damage)
//#define NO_FALL_DAMAGE_SOUND
// Disables Mario getting stuck in snow and sand when falling
//#define NO_GETTING_BURIED
// Number of coins to spawn the "100 coin" star. If you remove the define altogether, then there won't be a 100 coin star at all.
#define X_COIN_STAR 100
// Platform displacement 2 also known as momentum patch. Makes Mario keep the momemtum from moving platforms. Doesn't break treadmills anymore!

View File

@@ -123,6 +123,9 @@ s32 should_get_stuck_in_ground(struct MarioState *m) {
s32 flags = floor->flags;
s32 type = floor->type;
#ifdef NO_GETTING_BURIED
return FALSE;
#else
if (floor != NULL && (terrainType == TERRAIN_SNOW || terrainType == TERRAIN_SAND)
&& type != SURFACE_BURNING && SURFACE_IS_NOT_HARD(type)) {
if (!(flags & 0x01) && m->peakHeight - m->pos[1] > 1000.0f && floor->normal.y >= 0.8660254f) {
@@ -131,6 +134,7 @@ s32 should_get_stuck_in_ground(struct MarioState *m) {
}
return FALSE;
#endif
}
s32 check_fall_damage_or_get_stuck(struct MarioState *m, u32 hardFallAction) {