mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Fix revamped pvp oversight (#706)
This commit is contained in:
parent
0f7ba775c2
commit
f9b6fba0b5
1 changed files with 8 additions and 4 deletions
|
|
@ -1467,12 +1467,14 @@ u32 interact_player_pvp(struct MarioState* attacker, struct MarioState* victim)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
#define PLAYER_IN_ROLLOUT_FLIP(m) ((m->action == ACT_FORWARD_ROLLOUT || m->action == ACT_BACKWARD_ROLLOUT) && m->actionState == 1)
|
||||
|
||||
// see if it was an attack
|
||||
u32 interaction = determine_interaction(attacker, cVictim->marioObj);
|
||||
// Specfically override jump kicks to prevent low damage and low knockback kicks
|
||||
if (interaction & INT_HIT_FROM_BELOW && attacker->action == ACT_JUMP_KICK) { interaction = INT_KICK; }
|
||||
// Allow rollouts to attack
|
||||
else if ((attacker->action == ACT_FORWARD_ROLLOUT || attacker->action == ACT_BACKWARD_ROLLOUT) && attacker->actionState == 1) { interaction = INT_HIT_FROM_BELOW; }
|
||||
else if (PLAYER_IN_ROLLOUT_FLIP(attacker)) { interaction = INT_HIT_FROM_BELOW; }
|
||||
if (!(interaction & INT_ANY_ATTACK) || (interaction & INT_HIT_FROM_ABOVE) || !passes_pvp_interaction_checks(attacker, cVictim)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -1505,12 +1507,12 @@ u32 interact_player_pvp(struct MarioState* attacker, struct MarioState* victim)
|
|||
u8 forceAllowAttack = FALSE;
|
||||
if (gServerSettings.pvpType == PLAYER_PVP_REVAMPED) {
|
||||
// Give slidekicks trade immunity by making them (almost) invincible
|
||||
// Also give rollouts immunity to dives
|
||||
// Also give rollout flips immunity to dives
|
||||
if ((cVictim->action == ACT_SLIDE_KICK && attacker->action != ACT_SLIDE_KICK) ||
|
||||
((cVictim->action == ACT_FORWARD_ROLLOUT || cVictim->action == ACT_BACKWARD_ROLLOUT) && attacker->action == ACT_DIVE)) {
|
||||
(PLAYER_IN_ROLLOUT_FLIP(cVictim) && attacker->action == ACT_DIVE)) {
|
||||
return FALSE;
|
||||
} else if ((attacker->action == ACT_SLIDE_KICK) ||
|
||||
((attacker->action == ACT_FORWARD_ROLLOUT || attacker->action == ACT_BACKWARD_ROLLOUT) && cVictim->action == ACT_DIVE)) {
|
||||
(PLAYER_IN_ROLLOUT_FLIP(cVictim) && cVictim->action == ACT_DIVE)) {
|
||||
forceAllowAttack = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
@ -1521,6 +1523,8 @@ u32 interact_player_pvp(struct MarioState* attacker, struct MarioState* victim)
|
|||
}
|
||||
}
|
||||
|
||||
#undef PLAYER_IN_ROLLOUT_FLIP
|
||||
|
||||
// determine if ground pound should be ignored
|
||||
if (attacker->action == ACT_GROUND_POUND) {
|
||||
// not moving down yet?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue