File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1267,9 +1267,13 @@ namespace RTE {
1267
1267
owner->GetController ()->IsState (MOVE_RIGHT) && pushImpulse.m_X < 0 .0F ;
1268
1268
if (againstTravelDirection) {
1269
1269
// 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 ;)
1271
1270
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
+
1273
1277
pushImpulse.m_X *= againstIntendedDirectionMultiplier;
1274
1278
}
1275
1279
}
You can’t perform that action at this time.
0 commit comments