mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
parent
585f9e76a5
commit
b8be438472
1 changed files with 2 additions and 4 deletions
|
|
@ -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()));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue