mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-29 23:33:00 +00:00
Fix bounce state not entering when hit from top.
This commit is contained in:
parent
f39a389e99
commit
eaaf0cb8f6
1 changed files with 15 additions and 16 deletions
|
@ -3649,22 +3649,6 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
|
|||
mo->Angles.Yaw = angle;
|
||||
mo->VelFromAngle(speed);
|
||||
mo->PlayBounceSound(true);
|
||||
if (mo->BounceFlags & BOUNCE_UseBounceState)
|
||||
{
|
||||
FName names[] = { NAME_Bounce, NAME_Actor, NAME_Creature };
|
||||
FState *bouncestate;
|
||||
int count = 2;
|
||||
|
||||
if ((BlockingMobj->flags & MF_SHOOTABLE) && !(BlockingMobj->flags & MF_NOBLOOD))
|
||||
{
|
||||
count = 3;
|
||||
}
|
||||
bouncestate = mo->FindState(count, names);
|
||||
if (bouncestate != NULL)
|
||||
{
|
||||
mo->SetState(bouncestate);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3703,6 +3687,21 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
|
|||
mo->BounceFlags &= ~BOUNCE_TypeMask;
|
||||
}
|
||||
}
|
||||
if (mo->BounceFlags & BOUNCE_UseBounceState)
|
||||
{
|
||||
FName names[] = { NAME_Bounce, NAME_Actor, NAME_Creature };
|
||||
FState *bouncestate;
|
||||
int count = 2;
|
||||
if ((BlockingMobj->flags & MF_SHOOTABLE) && !(BlockingMobj->flags & MF_NOBLOOD))
|
||||
{
|
||||
count = 3;
|
||||
}
|
||||
bouncestate = mo->FindState(count, names);
|
||||
if (bouncestate != NULL)
|
||||
{
|
||||
mo->SetState(bouncestate);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue