From 636d7bb3ca297d53303897544a42f0d34203292d Mon Sep 17 00:00:00 2001 From: JugadorXEI Date: Sun, 19 May 2024 22:24:28 +0200 Subject: [PATCH 1/3] Set instawhip recharge's scale only if it differs from the player's --- src/objects/instawhip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/objects/instawhip.c b/src/objects/instawhip.c index c5b6683fa..408d9bb36 100644 --- a/src/objects/instawhip.c +++ b/src/objects/instawhip.c @@ -81,7 +81,8 @@ void Obj_InstaWhipRechargeThink(mobj_t *x) } P_MoveOrigin(x, target->x, target->y, target->z + (target->height / 2)); - P_InstaScale(x, 2 * target->scale); + if (x->scale != target->scale * 2) + P_InstaScale(x, target->scale * 2); x->angle = target->angle + recharge_offset(x); // Flickers every other frame From a9408fd62d8bfbce04cc6a23808096205b69170e Mon Sep 17 00:00:00 2001 From: JugadorXEI Date: Sun, 19 May 2024 23:46:35 +0200 Subject: [PATCH 2/3] Set instawhip recharge's height offset from the start --- src/objects/instawhip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objects/instawhip.c b/src/objects/instawhip.c index 408d9bb36..34bb84b35 100644 --- a/src/objects/instawhip.c +++ b/src/objects/instawhip.c @@ -59,7 +59,7 @@ void Obj_InstaWhipThink (mobj_t *whip) void Obj_SpawnInstaWhipRecharge(player_t *player, angle_t angleOffset) { - mobj_t *x = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_INSTAWHIP_RECHARGE); + mobj_t *x = P_SpawnMobjFromMobj(player->mo, 0, 0, player->mo->height / 2, MT_INSTAWHIP_RECHARGE); // This was previously used to delay the visual, back when this was VFX for a cooldown // instead of VFX for a charge. We want to instantly bail out of that state now. From cfc8aaa068b131a7930f7d4bfbcf87a2b251a58f Mon Sep 17 00:00:00 2001 From: JugadorXEI Date: Sat, 18 May 2024 14:26:21 +0200 Subject: [PATCH 3/3] Fix misaligned instawhip objects when under gravflip --- src/objects/instawhip.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/objects/instawhip.c b/src/objects/instawhip.c index 34bb84b35..bc7657f11 100644 --- a/src/objects/instawhip.c +++ b/src/objects/instawhip.c @@ -64,6 +64,7 @@ void Obj_SpawnInstaWhipRecharge(player_t *player, angle_t angleOffset) // This was previously used to delay the visual, back when this was VFX for a cooldown // instead of VFX for a charge. We want to instantly bail out of that state now. x->tics = 1; + x->eflags &= ~MFE_VERTICALFLIP; // Fix the visual being misaligned. x->renderflags |= RF_SLOPESPLAT | RF_NOSPLATBILLBOARD; P_SetTarget(&recharge_target(x), player->mo); @@ -92,6 +93,10 @@ void Obj_InstaWhipRechargeThink(mobj_t *x) void Obj_SpawnInstaWhipReject(player_t *player) { mobj_t *x = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_INSTAWHIP_REJECT); + x->eflags &= ~MFE_VERTICALFLIP; + // Fixes an issue with gravflip misplacing the object for the first tic. + if (player->mo->eflags & MFE_VERTICALFLIP) + P_SetOrigin(x, player->mo->x, player->mo->y, player->mo->z); P_SetTarget(&recharge_target(x), player->mo); }