Invert a case in 585f9e76a5

This was SVN commit r23683.
This commit is contained in:
bb 2020-05-20 19:47:40 +00:00
parent 585f9e76a5
commit b8be438472

View file

@ -5986,10 +5986,8 @@ UnitAI.prototype.TryMatchTargetSpeed = function(target, mayRun = true)
if (cmpUnitMotionTarget)
{
let targetSpeed = cmpUnitMotionTarget.GetCurrentSpeed();
if (!targetSpeed)
return;
this.SetSpeedMultiplier(Math.min(mayRun ? this.GetRunMultiplier() : 1, targetSpeed / this.GetWalkSpeed()));
if (targetSpeed)
this.SetSpeedMultiplier(Math.min(mayRun ? this.GetRunMultiplier() : 1, targetSpeed / this.GetWalkSpeed()));
}
};