From 1eab3a68380e26b6a75bb87d25b1f1f11fee179d Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Sat, 14 Oct 2023 16:09:21 -0700 Subject: [PATCH] More whip tuning --- src/k_kart.c | 4 ++-- src/k_kart.h | 2 ++ src/p_inter.c | 10 +--------- src/p_local.h | 1 - 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 9afb46eca..7af4d65ec 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1410,7 +1410,7 @@ static void K_UpdateDraft(player_t *player) } // Want to berserk attack? Get your speed FIRST. - if (player->instaWhipCharge >= INSTAWHIP_CHARGETIME) + if (player->instaWhipCharge >= INSTAWHIP_TETHERBLOCK) return; // Not enough speed to draft. @@ -11045,7 +11045,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if (chargingwhip) { - player->instaWhipCharge = min(player->instaWhipCharge + 1, INSTAWHIP_CHARGETIME + 1); + player->instaWhipCharge = min(player->instaWhipCharge + 1, INSTAWHIP_TETHERBLOCK + 1); if (player->instaWhipCharge == 1) { diff --git a/src/k_kart.h b/src/k_kart.h index 0add30624..13b55d9c3 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -35,6 +35,8 @@ Make sure this matches the actual number of states #define INSTAWHIP_DROPGUARD (12) #define INSTAWHIP_RINGDRAINEVERY (TICRATE/2) #define INSTAWHIP_HOLD_DELAY (TICRATE*2) +// MUST be longer or equal to INSTAWHIP_CHARGETIME. +#define INSTAWHIP_TETHERBLOCK (TICRATE*2) #define GUARDBREAK_COOLDOWN (TICRATE*4) #define FLAMESHIELD_MAX (120) diff --git a/src/p_inter.c b/src/p_inter.c index 6d8d47ed6..327b452ed 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -108,14 +108,6 @@ void P_RampConstant(const BasicFF_t *FFInfo, INT32 Start, INT32 End) // GET STUFF // -boolean P_Whipping(player_t *player) -{ - if (player->instaWhipCharge) - return true; - if (player->whip && !P_MobjWasRemoved(player->whip)) - return true; - return false; -} // // P_CanPickupItem @@ -132,7 +124,7 @@ boolean P_CanPickupItem(player_t *player, UINT8 weapon) // 2: Eggbox // 3: Paperitem - if (weapon != 2 && P_Whipping(player)) + if (weapon != 2 && player->instaWhipCharge) return false; if (weapon) diff --git a/src/p_local.h b/src/p_local.h index ef6964bc5..15b338f9d 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -544,7 +544,6 @@ void P_CheckTimeLimit(void); void P_CheckPointLimit(void); boolean P_CheckRacers(void); -boolean P_Whipping(player_t *player); boolean P_CanPickupItem(player_t *player, UINT8 weapon); boolean P_IsPickupCheesy(player_t *player, UINT8 type); void P_UpdateLastPickup(player_t *player, UINT8 type);