Minor WithInfantryBody reorganisation
Move PlayStandAnimation to a more suitable position inside the file.
This commit is contained in:
@@ -80,18 +80,6 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
move = init.Self.Trait<IMove>();
|
||||
}
|
||||
|
||||
public void PlayStandAnimation(Actor self)
|
||||
{
|
||||
state = AnimationState.Waiting;
|
||||
|
||||
var sequence = DefaultAnimation.GetRandomExistingSequence(Info.StandSequences, Game.CosmeticRandom);
|
||||
if (sequence != null)
|
||||
{
|
||||
var normalized = NormalizeInfantrySequence(self, sequence);
|
||||
DefaultAnimation.PlayRepeating(normalized);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Created(Actor self)
|
||||
{
|
||||
rsm = self.TraitOrDefault<IRenderInfantrySequenceModifier>();
|
||||
@@ -115,6 +103,18 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
return hasIdleSequence && !IsModifyingSequence;
|
||||
}
|
||||
|
||||
public void PlayStandAnimation(Actor self)
|
||||
{
|
||||
state = AnimationState.Waiting;
|
||||
|
||||
var sequence = DefaultAnimation.GetRandomExistingSequence(Info.StandSequences, Game.CosmeticRandom);
|
||||
if (sequence != null)
|
||||
{
|
||||
var normalized = NormalizeInfantrySequence(self, sequence);
|
||||
DefaultAnimation.PlayRepeating(normalized);
|
||||
}
|
||||
}
|
||||
|
||||
public void Attacking(Actor self, Target target, Armament a)
|
||||
{
|
||||
string sequence;
|
||||
|
||||
Reference in New Issue
Block a user