mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-26 15:31:03 +00:00
WIP: Longer charge for airbourne or tumble
Still need animation speed polish
This commit is contained in:
parent
a57273a2aa
commit
a1ed935aef
3 changed files with 11 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue