Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
codenamecpp committed Nov 3, 2019
1 parent 4b01ae0 commit aeea1b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/PedestrianStates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,7 @@ void PedestrianStateKnockedDown::ProcessStateFrame(Pedestrian* pedestrian, Times
{
if (pedestrian->mCurrentAnimID == eSpriteAnimationID_Ped_FallShort)
{
pedestrian->mPhysicsComponent->ClearForces();
pedestrian->SetAnimation(eSpriteAnimationID_Ped_LiesOnFloor, eSpriteAnimLoop_FromStart);
return;
}
Expand All @@ -454,6 +455,7 @@ void PedestrianStateKnockedDown::ProcessStateFrame(Pedestrian* pedestrian, Times
void PedestrianStateKnockedDown::ProcessStateEnter(Pedestrian* pedestrian, const PedestrianStateEvent* transitionEvent)
{
pedestrian->SetAnimation(eSpriteAnimationID_Ped_FallShort, eSpriteAnimLoop_None);
pedestrian->mPhysicsComponent->AddLinearImpulse(-pedestrian->mPhysicsComponent->GetSignVector() * 0.3f);
}

void PedestrianStateKnockedDown::ProcessStateExit(Pedestrian* pedestrian, const PedestrianStateEvent* transitionEvent)
Expand Down

0 comments on commit aeea1b5

Please sign in to comment.