diff --git a/src/p_map.cpp b/src/p_map.cpp index 0d9120c1b2..bb7164ef7c 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -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;