Introduce IdleMovementSpeed

That actually factors in speed modifiers and trait pause/disable.
This commit is contained in:
reaperrr
2021-06-18 18:33:47 +02:00
committed by Paul Chote
parent 1262a9c6c9
commit 5a548d6acc
2 changed files with 3 additions and 3 deletions

View File

@@ -607,6 +607,8 @@ namespace OpenRA.Mods.Common.Traits
}
public int MovementSpeed => !IsTraitDisabled && !IsTraitPaused ? Util.ApplyPercentageModifiers(Info.Speed, speedModifiers) : 0;
public int IdleMovementSpeed => Info.IdleSpeed < 0 ? MovementSpeed :
!IsTraitDisabled && !IsTraitPaused ? Util.ApplyPercentageModifiers(Info.IdleSpeed, speedModifiers) : 0;
public (CPos Cell, SubCell SubCell)[] OccupiedCells()
{