From a1ed935aef8c13ce3f41509be32aebf0a9725cbb Mon Sep 17 00:00:00 2001 From: Ashnal Date: Mon, 12 May 2025 21:34:21 -0400 Subject: [PATCH] WIP: Longer charge for airbourne or tumble Still need animation speed polish --- src/k_kart.c | 5 +++-- src/k_kart.h | 2 +- src/objects/bail.c | 7 +++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index 3723e4437..8842cf1b6 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -13923,8 +13923,9 @@ void K_MoveKartPlayer(player_t *player, boolean onground) if ((player->cmd.buttons & BT_VOTE) && ((player->itemtype && player->itemamount) || (player->rings > 0) || player->superring > 0 || player->pickuprings > 0 || player->itemRoulette.active)) { - player->bailcharge++; - if (P_PlayerInPain(player) && player->bailcharge == 1) + boolean onground = P_IsObjectOnGround(player->mo); + onground && player->tumbleBounces == 0 ? player->bailcharge += 2 : player->bailcharge++; // charge twice as fast on the ground + if (P_PlayerInPain(player) && player->bailcharge == 1 || onground && P_PlayerInPain(player) && player->bailcharge == 2) // this is brittle .. { mobj_t *bail = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + player->mo->height/2, MT_BAILCHARGE); P_SetTarget(&bail->target, player->mo); diff --git a/src/k_kart.h b/src/k_kart.h index b7ac61aff..5d55668ce 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -44,7 +44,7 @@ Make sure this matches the actual number of states #define INSTAWHIP_TETHERBLOCK (TICRATE*4) #define PUNISHWINDOW (7*TICRATE/10) -#define BAIL_MAXCHARGE (42) // tics to bail when not in painstate +#define BAIL_MAXCHARGE (84) // tics to bail when in painstate nad in air, on ground is half #define BAIL_DROP (FRACUNIT/2) #define BAIL_BOOST (FRACUNIT) #define BAIL_DROPFREQUENCY (3) diff --git a/src/objects/bail.c b/src/objects/bail.c index 3cf4f95a5..885574b06 100644 --- a/src/objects/bail.c +++ b/src/objects/bail.c @@ -67,6 +67,13 @@ void Obj_BailChargeThink (mobj_t *aura) aura->flags |= MF_NOCLIPTHING; // aura->color = mo->color; + aura->extravalue1 = max(0, aura->extravalue1-1); + if (aura->extravalue1 == 0 && (!P_IsObjectOnGround(player->mo) || player->tumbleBounces != 0)) + { + aura->anim_duration = 2; // hack the shit out of FF_ANIMATE hell yeah + aura->extravalue1 = 2; + } + // aura->renderflags &= ~RF_DONTDRAW; fixed_t baseScale = 12*mo->scale/10;