From 4928fec62290111dbf6faebb95e6d920d1a0e362 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Fri, 13 Oct 2023 22:49:06 -0700 Subject: [PATCH] Reduce whip charge time --- src/k_kart.h | 2 +- src/objects/instawhip.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/k_kart.h b/src/k_kart.h index 4fb0f1c42..0afc80a8b 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -30,7 +30,7 @@ Make sure this matches the actual number of states #define SHRINK_PHYSICS_SCALE (3*FRACUNIT/4) #define INSTAWHIP_DURATION (12) -#define INSTAWHIP_CHARGETIME (5*TICRATE/4) +#define INSTAWHIP_CHARGETIME (3*TICRATE/4) #define INSTAWHIP_DROPGUARD (12) #define INSTAWHIP_RINGDRAINEVERY (TICRATE/2) #define INSTAWHIP_HOLD_DELAY (TICRATE*2) diff --git a/src/objects/instawhip.c b/src/objects/instawhip.c index 9236c525c..377ace438 100644 --- a/src/objects/instawhip.c +++ b/src/objects/instawhip.c @@ -50,7 +50,9 @@ void Obj_SpawnInstaWhipRecharge(player_t *player, angle_t angleOffset) { mobj_t *x = P_SpawnMobjFromMobj(player->mo, 0, 0, 0, MT_INSTAWHIP_RECHARGE); - x->tics = max(INSTAWHIP_CHARGETIME - player->instaWhipCharge - states[x->info->raisestate].tics, 0); + // 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->renderflags |= RF_SLOPESPLAT | RF_NOSPLATBILLBOARD; P_SetTarget(&recharge_target(x), player->mo);