Charge animation imprevement

just sync the frame to the charge amount
This commit is contained in:
Ashnal 2025-06-01 16:50:24 -04:00
parent 341a018acc
commit d0225afacb
2 changed files with 3 additions and 9 deletions

View file

@ -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 (84) // tics to bail when in painstate nad in air, on ground is half
#define BAIL_MAXCHARGE (84) // tics to bail when in painstate nad in air, on ground is half, if you touch this, also update Obj_BailChargeThink synced animation logic
#define BAIL_DROP (FRACUNIT/2)
#define BAIL_BOOST (FRACUNIT)
#define BAIL_DROPFREQUENCY (3)

View file

@ -67,14 +67,8 @@ 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;
aura->anim_duration = 999; // This prevents FF_ANIMATE from working, we're gonna animate manually ourselves here
aura->frame = ((player->bailcharge-1)/2); // By syncing the frame with the charge timer here
fixed_t baseScale = 12*mo->scale/10;