Bail post hitlag VFX

This commit is contained in:
Ashnal 2025-06-01 21:44:20 -04:00
parent e9770bcf87
commit 8711e287e4
4 changed files with 7 additions and 7 deletions

View file

@ -1575,6 +1575,7 @@ const char *const STATE_LIST[] = { // array length left dynamic for sanity testi
"S_BLOCKBODY",
"S_BAIL",
"S_BAIB",
"S_BAILCHARGE",
"S_AMPRING",

View file

@ -335,6 +335,7 @@ char sprnames[NUMSPRITES + 1][5] =
"GBDY", // Guard body
"BAIL", // Bail charge
"BAIB", // Bail after effect
"TECH", // Bail tech charge
"TRC1", // Charge aura
@ -2163,7 +2164,8 @@ state_t states[NUMSTATES] =
{SPR_GRNG, FF_FULLBRIGHT|FF_PAPERSPRITE|0, -1, {NULL}, 0, 0, S_NULL}, // S_BLOCKRING
{SPR_GBDY, FF_FULLBRIGHT|FF_ANIMATE|0, -1, {NULL}, 4, 2, S_NULL}, // S_BLOCKBODY
{SPR_BAIL, FF_FULLBRIGHT|FF_ANIMATE|0, -1, {NULL}, 8, 1, S_NULL}, // S_BAIL
{SPR_BAIL, FF_FULLBRIGHT|FF_ANIMATE|0, 8, {NULL}, 8, 1, S_BAIB}, // S_BAIL
{SPR_BAIB, FF_FULLBRIGHT|FF_ANIMATE|0, 10, {NULL}, 9, 1, S_NULL}, // S_BAIB
{SPR_TECH, FF_FULLBRIGHT|FF_ANIMATE|0, -1, {NULL}, 41, 1, S_NULL}, // S_BAILCHARGE
{SPR_AMPB, FF_FULLBRIGHT|FF_PAPERSPRITE|0, -1, {NULL}, 0, 0, S_NULL}, // S_AMPRING

View file

@ -876,6 +876,7 @@ typedef enum sprite
SPR_GBDY, // Guard body
SPR_BAIL, // Bail charge
SPR_BAIB, // Bail after effect
SPR_TECH, // Bail tech charge
SPR_TRC1, // Charge aura
@ -2633,6 +2634,7 @@ typedef enum state
S_BLOCKBODY,
S_BAIL,
S_BAIB,
S_BAILCHARGE,
S_AMPRING,

View file

@ -23,22 +23,17 @@ void Obj_BailThink (mobj_t *aura)
|| aura->target->health == 0
|| aura->target->destscale <= 1 // sealed star fall out
|| !aura->target->player
|| !aura->target->hitlag)
|| P_PlayerInPain(aura->target->player)) // if you got hit when starting to bail, cancel the VFX
{
P_RemoveMobj(aura);
}
else
{
mobj_t *mo = aura->target;
ATTRUNUSED player_t *player = mo->player;
// Follow player
aura->flags &= ~(MF_NOCLIPTHING);
P_MoveOrigin(aura, mo->x, mo->y, mo->z + mo->height/2);
aura->flags |= MF_NOCLIPTHING;
// aura->color = mo->color;
// aura->renderflags &= ~RF_DONTDRAW;
fixed_t baseScale = 12*mo->scale/10;