Skip to content

Commit 7bfdfb4

Browse files
committed
Stop bouncing when prone
1 parent 04829b5 commit 7bfdfb4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Entities/AtomGroup.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,9 +1267,13 @@ namespace RTE {
12671267
owner->GetController()->IsState(MOVE_RIGHT) && pushImpulse.m_X < 0.0F;
12681268
if (againstTravelDirection) {
12691269
// Filter some of our impulse out. We're pushing against an obstacle, but we don't want to kick backwards!
1270-
// Translate it into to upwards motion to step over what we're walking into instead ;)
12711270
const float againstIntendedDirectionMultiplier = 0.5F;
1272-
pushImpulse.m_Y -= std::abs(pushImpulse.m_X * (1.0F - againstIntendedDirectionMultiplier));
1271+
1272+
if (!owner->GetController()->IsState(BODY_CROUCH) && !owner->GetController()->IsState(MOVE_DOWN)) {
1273+
// Translate it into to upwards motion to step over what we're walking into instead ;)
1274+
pushImpulse.m_Y -= std::abs(pushImpulse.m_X * (1.0F - againstIntendedDirectionMultiplier));
1275+
}
1276+
12731277
pushImpulse.m_X *= againstIntendedDirectionMultiplier;
12741278
}
12751279
}

0 commit comments

Comments
 (0)