From 90c0970a890545a86d0c085946ae6f8ea03bc3c5 Mon Sep 17 00:00:00 2001 From: Sunk <69110309+Sunketchupm@users.noreply.github.com> Date: Tue, 8 Oct 2024 20:44:43 -0400 Subject: [PATCH] Rework dive piercing Instead of all actions being able to hit dives other than jumpkicks, now only slidekicks (and ground pounds) can hit dives. --- src/game/interaction.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/game/interaction.c b/src/game/interaction.c index cbe71c775..b00a5406a 100644 --- a/src/game/interaction.c +++ b/src/game/interaction.c @@ -1465,15 +1465,14 @@ u32 interact_player_pvp(struct MarioState* attacker, struct MarioState* victim) if (attacker->action == ACT_SLIDE_KICK_SLIDE || attacker->action == ACT_SLIDE_KICK) { // if the difference vectors are not different enough, do not attack if (vec3f_length(attacker->vel) < 15) { return FALSE; } - } else if (attacker->action != ACT_JUMP_KICK && cVictim->action == ACT_DIVE) { - // do nothing, which means that it will always be possible to hit a dive } else { // if the difference vectors are not different enough, do not attack if (vec3f_length(attacker->vel) < 40) { return FALSE; } } // if the victim is going faster, do not attack - if (cVictim->action != ACT_DIVE && vec3f_length(cVictim->vel) > vec3f_length(attacker->vel)) { return FALSE; } + // However if the victim is diving and the attacker is slidekicking, do not check speed + if (!(attacker->action == ACT_SLIDE_KICK && cVictim->action == ACT_DIVE) && vec3f_length(cVictim->vel) > vec3f_length(attacker->vel)) { return FALSE; } } // determine if ground pound should be ignored