From 1baf316a26fbbd41fcaad2a116414d383b31ab8c Mon Sep 17 00:00:00 2001 From: Agent X <44549182+AgentXLP@users.noreply.github.com> Date: Thu, 27 Jun 2024 07:40:50 -0400 Subject: [PATCH] Make player hitboxes a bit bigger --- src/game/object_collision.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/game/object_collision.c b/src/game/object_collision.c index 4fa478b25..40b97ee11 100644 --- a/src/game/object_collision.c +++ b/src/game/object_collision.c @@ -36,9 +36,8 @@ int detect_player_hitbox_overlap(struct MarioState* local, struct MarioState* re f32 sp3C = aTorso[1] - a->hitboxDownOffset; f32 sp38 = bTorso[1] - b->hitboxDownOffset; f32 dx = aTorso[0] - bTorso[0]; - UNUSED f32 sp30 = sp3C - sp38; f32 dz = aTorso[2] - bTorso[2]; - f32 collisionRadius = (a->hitboxRadius + b->hitboxRadius) * 1.6f; // slightly increased from 1.5f for the sake of it + f32 collisionRadius = (a->hitboxRadius + b->hitboxRadius) * 1.75f; // slightly increased from 1.5f for the sake of it f32 distance = sqrtf(dx * dx + dz * dz); if (collisionRadius * scale > distance) { @@ -69,7 +68,6 @@ s32 detect_object_hitbox_overlap(struct Object *a, struct Object *b) { f32 sp3C = a->oPosY - a->hitboxDownOffset; f32 sp38 = b->oPosY - b->hitboxDownOffset; f32 dx = a->oPosX - b->oPosX; - UNUSED f32 sp30 = sp3C - sp38; f32 dz = a->oPosZ - b->oPosZ; f32 collisionRadius = a->hitboxRadius + b->hitboxRadius; f32 distance = sqrtf(dx * dx + dz * dz); @@ -113,7 +111,6 @@ s32 detect_object_hurtbox_overlap(struct Object *a, struct Object *b) { f32 sp3C = a->oPosY - a->hitboxDownOffset; f32 sp38 = b->oPosY - b->hitboxDownOffset; f32 sp34 = a->oPosX - b->oPosX; - UNUSED f32 sp30 = sp3C - sp38; f32 sp2C = a->oPosZ - b->oPosZ; f32 sp28 = a->hurtboxRadius + b->hurtboxRadius; f32 sp24 = sqrtf(sp34 * sp34 + sp2C * sp2C);