From a96a64dff654fe66ae12bdb630e9bc43175ddc39 Mon Sep 17 00:00:00 2001 From: James R Date: Thu, 7 Dec 2023 15:42:58 -0800 Subject: [PATCH] Broly: scale hitbox --- src/info.c | 4 ++-- src/objects/broly.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/info.c b/src/info.c index 4e64a278a..b86c14411 100644 --- a/src/info.c +++ b/src/info.c @@ -30674,8 +30674,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL, // xdeathstate sfx_None, // deathsound 0, // speed - 0, // radius - 0, // height + 40*FRACUNIT, // radius + 80*FRACUNIT, // height 0, // display offset 100, // mass 1, // damage diff --git a/src/objects/broly.cpp b/src/objects/broly.cpp index 18d3df972..76d8df3da 100644 --- a/src/objects/broly.cpp +++ b/src/objects/broly.cpp @@ -64,7 +64,7 @@ struct Broly : Mobj x->target(source); // Shrink into center of source object. - x->z = (source->z + source->height / 2); + x->z = source->center().z - (x->height / 2); x->colorized = true; x->color = source->color; @@ -90,9 +90,11 @@ struct Broly : Mobj return false; } + const Fixed center = z + (height / 2); const Vec2 v = size(); scale(Easing_OutSine(linear(), v.y, v.x)); + z = center - (height / 2); return true; }