Skip to content

Commit be2a441

Browse files
committed
Simplified codes
1 parent 3720d42 commit be2a441

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Ext/Unit/Hooks.Jumpjet.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ int JumpjetRushHelpers::JumpjetLocomotionPredictHeight(JumpjetLocomotionClass* p
272272
// If is moving
273273
if (pThis->CurrentSpeed > 0.0)
274274
{
275-
const auto checkLength = pThis->LocomotionFacing.IsRotating() ? Unsorted::LeptonsPerCell
276-
: (pFoot->Destination ? Math::min((Unsorted::LeptonsPerCell * 5), pFoot->DistanceFrom(pFoot->Destination)) : Unsorted::LeptonsPerCell);
275+
const auto checkLength = (pThis->LocomotionFacing.IsRotating() || !pFoot->Destination) ? Unsorted::LeptonsPerCell
276+
: Math::min((Unsorted::LeptonsPerCell * 5), pFoot->DistanceFrom(pFoot->Destination));
277277
const auto angle = -pThis->LocomotionFacing.Current().GetRadian<65536>();
278278
const auto checkCoord = Point2D { static_cast<int>(checkLength * cos(angle) + 0.5), static_cast<int>(checkLength * sin(angle) + 0.5) };
279279
const auto largeStep = Math::max(abs(checkCoord.X), abs(checkCoord.Y));

0 commit comments

Comments
 (0)