Introduce IdleMovementSpeed
That actually factors in speed modifiers and trait pause/disable.
This commit is contained in:
@@ -52,10 +52,8 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
if (isIdleTurner)
|
||||
{
|
||||
var speed = aircraft.Info.IdleSpeed < 0 ? aircraft.Info.Speed : aircraft.Info.IdleSpeed;
|
||||
|
||||
// This override is necessary, otherwise aircraft with CanSlide would circle sideways
|
||||
var move = aircraft.FlyStep(speed, aircraft.Facing);
|
||||
var move = aircraft.FlyStep(aircraft.IdleMovementSpeed, aircraft.Facing);
|
||||
|
||||
// We can't possibly turn this fast
|
||||
var desiredFacing = aircraft.Facing + new WAngle(256);
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user