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)
|
||||
|
||||
@@ -233,7 +233,7 @@ FREMEN:
|
||||
Weapon: Slung
|
||||
AttackFrontal:
|
||||
RenderInfantry:
|
||||
IdleAnimations: stand,stand2
|
||||
IdleAnimations: stand
|
||||
TakeCover:
|
||||
Cloak:
|
||||
InitialDelay: 250
|
||||
@@ -265,7 +265,7 @@ GRENADIER:
|
||||
AttackFrontal:
|
||||
TakeCover:
|
||||
RenderInfantry:
|
||||
IdleAnimations: stand,stand2
|
||||
IdleAnimations: stand
|
||||
Explodes:
|
||||
Weapon: UnitExplodeSmall
|
||||
Chance: 100
|
||||
|
||||
@@ -171,6 +171,7 @@
|
||||
TargetableUnit:
|
||||
TargetTypes: Ground
|
||||
RenderInfantry:
|
||||
TakeCover:
|
||||
AutoTarget:
|
||||
AttackMove:
|
||||
Passenger:
|
||||
|
||||
@@ -231,7 +231,7 @@ SARDAUKAR:
|
||||
Range: 6c0
|
||||
TakeCover:
|
||||
RenderInfantry:
|
||||
IdleAnimations: stand,stand2
|
||||
IdleAnimations: stand
|
||||
Armament@PRIMARY:
|
||||
Weapon: Vulcan
|
||||
Armament@SECONDARY:
|
||||
|
||||
@@ -20,7 +20,7 @@ RIFLE:
|
||||
AttackFrontal:
|
||||
TakeCover:
|
||||
RenderInfantry:
|
||||
IdleAnimations: stand,stand2
|
||||
IdleAnimations: stand
|
||||
|
||||
ENGINEER:
|
||||
Inherits: ^Infantry
|
||||
@@ -72,7 +72,7 @@ BAZOOKA:
|
||||
AttackFrontal:
|
||||
TakeCover:
|
||||
RenderInfantry:
|
||||
IdleAnimations: stand,stand2
|
||||
IdleAnimations: stand
|
||||
|
||||
MEDIC:
|
||||
Inherits: ^Infantry
|
||||
|
||||
@@ -3,14 +3,6 @@ rifle:
|
||||
Start: 206
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
stand2: DATA
|
||||
Start: 206
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
stand3: DATA
|
||||
Start: 206
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
run: DATA
|
||||
Start: 214
|
||||
Length: 6
|
||||
@@ -142,10 +134,6 @@ engineer:
|
||||
Start: 1166
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
stand2: DATA
|
||||
Start: 1166
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
run: DATA
|
||||
Start: 1174
|
||||
Length: 6
|
||||
@@ -182,10 +170,6 @@ medic: # actually thumper
|
||||
Start: 1402
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
stand2: DATA
|
||||
Start: 1402
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
run: DATA
|
||||
Start: 1410
|
||||
Length: 6
|
||||
@@ -242,10 +226,6 @@ fremen:
|
||||
Start: 694
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
stand2: DATA
|
||||
Start: 694
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
run: DATA
|
||||
Start: 702
|
||||
Length: 6
|
||||
@@ -309,14 +289,6 @@ saboteur:
|
||||
Start: 2149
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
stand2: DATA
|
||||
Start: 2149
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
stand3: DATA
|
||||
Start: 2149
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
run: DATA
|
||||
Start: 2157
|
||||
Length: 6
|
||||
@@ -370,10 +342,6 @@ sardaukar:
|
||||
Start: 930
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
stand2: DATA
|
||||
Start: 930
|
||||
Facings: -8
|
||||
Transpose: true
|
||||
run: DATA
|
||||
Start: 938
|
||||
Length: 6
|
||||
@@ -436,9 +404,6 @@ grenadier: # 2502 - 2749 in 1.06 DATA.R8
|
||||
stand:
|
||||
Start: 0
|
||||
Facings: 8
|
||||
stand2:
|
||||
Start: 8
|
||||
Facings: 8
|
||||
idle:
|
||||
Start: 203
|
||||
Length: 16
|
||||
|
||||
Reference in New Issue
Block a user