Refactored ticks to delay per issue #9810
This commit is contained in:
committed by
colonelpopcorn
parent
689f05c3ca
commit
2d4c3f715f
@@ -19,8 +19,8 @@ namespace OpenRA.Mods.Common.Traits
|
||||
{
|
||||
public class WithInfantryBodyInfo : UpgradableTraitInfo, IRenderActorPreviewSpritesInfo, Requires<IMoveInfo>, Requires<RenderSpritesInfo>
|
||||
{
|
||||
public readonly int MinIdleWaitTicks = 30;
|
||||
public readonly int MaxIdleWaitTicks = 110;
|
||||
public readonly int MinIdleDelay = 30;
|
||||
public readonly int MaxIdleDelay = 110;
|
||||
|
||||
[SequenceReference] public readonly string MoveSequence = "run";
|
||||
[SequenceReference] public readonly string AttackSequence = null;
|
||||
@@ -146,7 +146,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (Info.IdleSequences.Length > 0)
|
||||
{
|
||||
idleSequence = Info.IdleSequences.Random(self.World.SharedRandom);
|
||||
idleDelay = self.World.SharedRandom.Next(Info.MinIdleWaitTicks, Info.MaxIdleWaitTicks);
|
||||
idleDelay = self.World.SharedRandom.Next(Info.MinIdleDelay, Info.MaxIdleDelay);
|
||||
}
|
||||
}
|
||||
else if (AllowIdleAnimation(self))
|
||||
|
||||
Reference in New Issue
Block a user