Remove MuzzleSplitFacings and expose MuzzleSequence to testing.
This commit is contained in:
committed by
abcdefg30
parent
b03ab1212f
commit
c48eb572e3
@@ -53,6 +53,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Recoil recovery per-frame")]
|
||||
public readonly WDist RecoilRecovery = new WDist(9);
|
||||
|
||||
[SequenceReference]
|
||||
[Desc("Muzzle flash sequence to render")]
|
||||
public readonly string MuzzleSequence = null;
|
||||
|
||||
@@ -60,9 +61,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Palette to render Muzzle flash sequence in")]
|
||||
public readonly string MuzzlePalette = "effect";
|
||||
|
||||
[Desc("Use multiple muzzle images if non-zero")]
|
||||
public readonly int MuzzleSplitFacings = 0;
|
||||
|
||||
[GrantedConditionReference]
|
||||
[Desc("Condition to grant while reloading.")]
|
||||
public readonly string ReloadingCondition = null;
|
||||
|
||||
@@ -173,10 +173,6 @@ namespace OpenRA.Mods.Common.Traits
|
||||
// Muzzle facing is fixed once the firing starts
|
||||
var muzzleAnim = new Animation(self.World, paxRender[a.Actor].GetImage(a.Actor), () => targetYaw);
|
||||
var sequence = a.Info.MuzzleSequence;
|
||||
|
||||
if (a.Info.MuzzleSplitFacings > 0)
|
||||
sequence += Util.IndexFacing(targetYaw, a.Info.MuzzleSplitFacings).ToString();
|
||||
|
||||
var muzzleFlash = new AnimationWithOffset(muzzleAnim,
|
||||
() => PortOffset(self, port),
|
||||
() => false,
|
||||
|
||||
@@ -76,9 +76,6 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
return;
|
||||
|
||||
var sequence = a.Info.MuzzleSequence;
|
||||
if (a.Info.MuzzleSplitFacings > 0)
|
||||
sequence += Util.IndexFacing(getFacing(), a.Info.MuzzleSplitFacings).ToString();
|
||||
|
||||
visible[barrel] = true;
|
||||
anims[barrel].Animation.PlayThen(sequence, () => visible[barrel] = false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user