Using floor-based terrain instead of area-based
This commit is contained in:
@@ -115,12 +115,11 @@ s32 check_kick_or_dive_in_air(struct MarioState *m) {
|
||||
}
|
||||
|
||||
s32 should_get_stuck_in_ground(struct MarioState *m) {
|
||||
u32 terrainType = m->area->terrainType & TERRAIN_MASK;
|
||||
struct Surface *floor = m->floor;
|
||||
s32 flags = floor->flags;
|
||||
s32 type = floor->type;
|
||||
|
||||
if (floor != NULL && (terrainType == TERRAIN_SNOW || terrainType == TERRAIN_SAND)
|
||||
if (floor != NULL && (m->curTerrain == TERRAIN_SNOW || m->curTerrain == 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) {
|
||||
return TRUE;
|
||||
@@ -1556,8 +1555,9 @@ s32 act_lava_boost(struct MarioState *m) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
set_mario_animation(m, MARIO_ANIM_FIRE_LAVA_BURN);
|
||||
if ((m->area->terrainType & TERRAIN_MASK) != TERRAIN_SNOW && !(m->flags & MARIO_METAL_CAP)
|
||||
if (m->curTerrain != TERRAIN_SNOW && !(m->flags & MARIO_METAL_CAP)
|
||||
&& m->vel[1] > 0.0f) {
|
||||
m->particleFlags |= PARTICLE_FIRE;
|
||||
if (m->actionState == 0) {
|
||||
|
||||
Reference in New Issue
Block a user