Merge pull request #6331 from Mailaender/infantry-noidle-fix
Fixed Dune 2000 infantry not showing the waiting animation when ordered to stop firing
This commit is contained in:
@@ -142,13 +142,18 @@ namespace OpenRA.Mods.RA.Render
|
||||
if (DefaultAnimation.HasSequence(idleSequence))
|
||||
{
|
||||
state = AnimationState.IdleAnimating;
|
||||
DefaultAnimation.PlayThen(idleSequence, () =>
|
||||
DefaultAnimation.PlayThen(idleSequence, () =>
|
||||
{
|
||||
DefaultAnimation.PlayRepeating(NormalizeInfantrySequence(self, info.StandAnimations.Random(Game.CosmeticRandom)));
|
||||
state = AnimationState.Waiting;
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DefaultAnimation.PlayRepeating(NormalizeInfantrySequence(self, info.StandAnimations.Random(Game.CosmeticRandom)));
|
||||
state = AnimationState.Waiting;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Possibly move this into a separate trait
|
||||
@@ -161,7 +166,7 @@ namespace OpenRA.Mods.RA.Render
|
||||
if (info.SpawnsCorpse)
|
||||
{
|
||||
SpawnCorpse(self, info.DeathAnimationPrefix + (e.Warhead.DeathType));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SpawnCorpse(Actor self, string sequence)
|
||||
|
||||
@@ -24,6 +24,8 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public readonly WVec ProneOffset = new WVec(85, 0, -171);
|
||||
|
||||
public readonly string ProneSequencePrefix = "prone-";
|
||||
|
||||
public override object Create(ActorInitializer init) { return new TakeCover(init, this); }
|
||||
}
|
||||
|
||||
@@ -34,7 +36,7 @@ namespace OpenRA.Mods.RA
|
||||
bool isProne { get { return remainingProneTime > 0; } }
|
||||
|
||||
public bool IsModifyingSequence { get { return isProne; } }
|
||||
public string SequencePrefix { get { return "prone-"; } }
|
||||
public string SequencePrefix { get { return info.ProneSequencePrefix ; } }
|
||||
|
||||
public TakeCover(ActorInitializer init, TakeCoverInfo info)
|
||||
: base(init, info)
|
||||
|
||||
Reference in New Issue
Block a user