mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-10-18 11:18:30 +00:00
Made players drop held obj when bouncing on each other
This commit is contained in:
parent
434176e7d6
commit
a28f046eb9
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue