Super Flicky: fix super state getting stuck when range check

This commit is contained in:
James R 2024-01-08 18:39:35 -08:00
parent dd6c37cac0
commit 370ba1b3e0

View file

@ -314,6 +314,12 @@ struct Flicky : mobj_t
} }
else else
{ {
if (stunned())
{
unnerf();
mode(Mode::kHunting);
}
if (chasing() != next_target()) if (chasing() != next_target())
{ {
chasing(next_target()); chasing(next_target());
@ -321,15 +327,6 @@ struct Flicky : mobj_t
S_StartSound(this, sfx_fhurt2); S_StartSound(this, sfx_fhurt2);
} }
if (stunned())
{
light_up(true);
flags = info->flags;
mode(Mode::kHunting);
S_StartSound(this, sfx_s3k9f);
}
} }
} }
@ -484,6 +481,7 @@ struct Flicky : mobj_t
{ {
if (AngleDelta(th, R_PointToAngle2(x + momx, y + momy, pos.x, pos.y)) > ANG1) if (AngleDelta(th, R_PointToAngle2(x + momx, y + momy, pos.x, pos.y)) > ANG1)
{ {
unnerf();
mode(Mode::kReserved); mode(Mode::kReserved);
controller()->collect(); controller()->collect();
} }
@ -576,6 +574,14 @@ struct Flicky : mobj_t
flags &= ~(MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPHEIGHT); flags &= ~(MF_NOGRAVITY|MF_NOCLIP|MF_NOCLIPHEIGHT);
} }
void unnerf()
{
light_up(true);
flags = info->flags;
S_StartSound(this, sfx_s3k9f);
}
void whip() void whip()
{ {
reflect(); reflect();