Made players drop held obj when bouncing on each other

This commit is contained in:
MysterD 2022-02-05 10:25:20 -08:00
parent 434176e7d6
commit a28f046eb9

View file

@ -1257,15 +1257,19 @@ static u8 resolve_player_collision(struct MarioState* m, struct MarioState* m2)
}
f32 velY = fmax(fmin(50.0f, 10.0f + fabs(m->vel[1])), 30.0f);
if (m2->action == ACT_CROUCHING) {
mario_stop_riding_and_holding(m);
set_mario_action(m, ACT_TWIRLING, 0);
velY = fmax(fmin(100.0f, 30.0f + fabs(m->vel[1])), 80.0f);
} else if (m->action == ACT_JUMP) {
mario_stop_riding_and_holding(m);
set_mario_action(m, ACT_DOUBLE_JUMP, 0);
velY = fmax(fmin(55.0f, 15.0f + fabs(m->vel[1])), 35.0f);
} else if (m->action == ACT_DOUBLE_JUMP) {
mario_stop_riding_and_holding(m);
set_mario_action(m, (gSpecialTripleJump && m->playerIndex == 0) ? ACT_SPECIAL_TRIPLE_JUMP : ACT_TRIPLE_JUMP, 0);
velY = fmax(fmin(60.0f, 20.0f + fabs(m->vel[1])), 40.0f);
} else {
mario_stop_riding_and_holding(m);
set_mario_action(m, ACT_JUMP, 0);
velY = fmax(fmin(50.0f, 15.0f + fabs(m->vel[1])), 30.0f);
}