fixed #934 -- convert all AttackBase.MuzzleFlash uses to WithMuzzleFlash
This commit is contained in:
@@ -29,7 +29,6 @@ namespace OpenRA.Mods.RA
|
||||
public readonly int[] SecondaryLocalOffset = { };
|
||||
public readonly int[] PrimaryOffset = { 0, 0 };
|
||||
public readonly int[] SecondaryOffset = null;
|
||||
public readonly bool MuzzleFlash = false;
|
||||
public readonly int FireDelay = 0;
|
||||
|
||||
public readonly bool AlignIdleTurrets = false;
|
||||
|
||||
@@ -26,7 +26,6 @@ namespace OpenRA.Mods.RA.Render
|
||||
var facing = self.Trait<IFacing>();
|
||||
var turreted = self.Trait<Turreted>();
|
||||
var attack = self.TraitOrDefault<AttackBase>();
|
||||
var attackInfo = self.Info.Traits.Get<AttackBaseInfo>();
|
||||
|
||||
var turretAnim = new Animation(GetImage(self), () => turreted.turretFacing );
|
||||
turretAnim.Play( "turret" );
|
||||
@@ -38,17 +37,6 @@ namespace OpenRA.Mods.RA.Render
|
||||
new AnimationWithOffset( turretAnim,
|
||||
() => Combat.GetTurretPosition( self, facing, turret ),
|
||||
null));
|
||||
|
||||
if (attackInfo.MuzzleFlash)
|
||||
{
|
||||
var muzzleFlash = new Animation(GetImage(self), () => turreted.turretFacing);
|
||||
muzzleFlash.PlayFetchIndex("muzzle",
|
||||
() => (int)(turret.Recoil * 5.9f)); /* hack: dumb crap */
|
||||
anims.Add("muzzle_flash_{0}".F(i),
|
||||
new AnimationWithOffset(muzzleFlash,
|
||||
() => Combat.GetTurretPosition(self, facing, turret),
|
||||
() => turret.Recoil <= 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,6 @@ APC:
|
||||
AttackFrontal:
|
||||
PrimaryWeapon: QuadCannon
|
||||
PrimaryOffset: 0,0,0,-4
|
||||
MuzzleFlash: yes
|
||||
RenderUnit:
|
||||
WithMuzzleFlash:
|
||||
AutoTarget:
|
||||
@@ -195,7 +194,7 @@ BGGY:
|
||||
AttackTurreted:
|
||||
PrimaryWeapon: MachineGun
|
||||
PrimaryOffset: 0,1,0,-3
|
||||
MuzzleFlash: yes
|
||||
WithMuzzleFlash:
|
||||
RenderUnitTurreted:
|
||||
AutoTarget:
|
||||
LeavesHusk:
|
||||
@@ -257,7 +256,7 @@ JEEP:
|
||||
AttackTurreted:
|
||||
PrimaryWeapon: MachineGun
|
||||
PrimaryOffset: 0,0,0,-2
|
||||
MuzzleFlash: yes
|
||||
WithMuzzleFlash:
|
||||
RenderUnitTurreted:
|
||||
AutoTarget:
|
||||
LeavesHusk:
|
||||
@@ -471,4 +470,4 @@ STNK:
|
||||
AutoTarget:
|
||||
TargetableUnit:
|
||||
LeavesHusk:
|
||||
HuskActor: STNK.Husk
|
||||
HuskActor: STNK.Husk
|
||||
|
||||
@@ -288,7 +288,7 @@ JEEP:
|
||||
AttackTurreted:
|
||||
PrimaryWeapon: M60mg
|
||||
PrimaryOffset: 0,0,0,-2
|
||||
MuzzleFlash: yes
|
||||
WithMuzzleFlash:
|
||||
RenderUnitTurreted:
|
||||
AutoTarget:
|
||||
Cargo:
|
||||
@@ -319,7 +319,6 @@ APC:
|
||||
AttackFrontal:
|
||||
PrimaryWeapon: M60mg
|
||||
PrimaryOffset: 0,0,0,-4
|
||||
MuzzleFlash: yes
|
||||
RenderUnit:
|
||||
WithMuzzleFlash:
|
||||
AutoTarget:
|
||||
|
||||
Reference in New Issue
Block a user