Skip to content

Commit

Permalink
fix #6074
Browse files Browse the repository at this point in the history
  • Loading branch information
rt committed Nov 11, 2018
1 parent 0b800f1 commit fabec3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rts/Sim/MoveTypes/HoverAirMoveType.cpp
Expand Up @@ -556,7 +556,7 @@ void CHoverAirMoveType::UpdateFlying()
// wantedSpeed is a vector, so even aircraft with turnRate=0
// are coincidentally able to reach any goal by side-strafing
wantedHeading = GetHeadingFromVector(goalVec.x, goalVec.z);
wantedSpeed = (goalVec / goalDist) * goalSpeed;
wantedSpeed = (goalVec / goalDist) * std::min(goalSpeed, maxWantedSpeed);
} else {
// switch to hovering (if !CanLand()))
if (!UnitIsBusy(owner)) {
Expand Down Expand Up @@ -915,7 +915,7 @@ bool CHoverAirMoveType::Update()
wantedSpeed -= ( right * fpsCon.left );

wantedSpeed.Normalize();
wantedSpeed *= maxSpeed;
wantedSpeed *= maxWantedSpeed;

if (!nextPos.IsInBounds())
owner->SetVelocityAndSpeed(ZeroVector);
Expand Down

0 comments on commit fabec3d

Please sign in to comment.