Fixed floorSpeedMultiplier being squared
This commit is contained in:
@@ -104,15 +104,18 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
||||
return type.hasWeapons();
|
||||
}
|
||||
|
||||
/** @return speed with boost & floor multipliers factored in. */
|
||||
public float speed(){
|
||||
float strafePenalty = isGrounded() || !isPlayer() ? 1f : Mathf.lerp(1f, type.strafePenalty, Angles.angleDist(vel().angle(), rotation) / 180f);
|
||||
float boost = Mathf.lerp(1f, type.canBoost ? type.boostMultiplier : 1f, elevation);
|
||||
//limit speed to minimum formation speed to preserve formation
|
||||
return (isCommanding() ? minFormationSpeed * 0.98f : type.speed) * strafePenalty;
|
||||
return (isCommanding() ? minFormationSpeed * 0.98f : type.speed) * strafePenalty * boost * floorSpeedMultiplier();
|
||||
}
|
||||
|
||||
/** @return speed with boost multipliers factored in. */
|
||||
/** @deprecated use speed() instead */
|
||||
@Deprecated
|
||||
public float realSpeed(){
|
||||
return Mathf.lerp(1f, type.canBoost ? type.boostMultiplier : 1f, elevation) * speed() * floorSpeedMultiplier();
|
||||
return speed();
|
||||
}
|
||||
|
||||
/** Iterates through this unit and everything it is controlling. */
|
||||
|
||||
Reference in New Issue
Block a user