IonCannonPower can now define how many ticks into animation the weapon impact happens (as opposed to at the end of the animation).
This commit is contained in:
@@ -21,13 +21,19 @@ namespace OpenRA.Mods.Cnc
|
||||
[ActorReference]
|
||||
[Desc("Actor to spawn when the attack starts")]
|
||||
public readonly string CameraActor = null;
|
||||
|
||||
[Desc("Amount of time to keep the camera alive")]
|
||||
public readonly int CameraRemoveDelay = 25;
|
||||
|
||||
[Desc("Effect sequence to display")]
|
||||
public readonly string Effect = "ionsfx";
|
||||
public readonly string EffectPalette = "effect";
|
||||
|
||||
[Desc("Which weapon to fire")]
|
||||
public readonly string Weapon = "IonCannon";
|
||||
|
||||
[Desc("Apply the weapon impact this many ticks into the effect")]
|
||||
public readonly int WeaponDelay = 7;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new IonCannonPower(init.self, this); }
|
||||
}
|
||||
@@ -50,7 +56,7 @@ namespace OpenRA.Mods.Cnc
|
||||
{
|
||||
var info = Info as IonCannonPowerInfo;
|
||||
Sound.Play(Info.LaunchSound, self.World.Map.CenterOfCell(order.TargetLocation));
|
||||
w.Add(new IonCannon(self.Owner, info.Weapon, w, order.TargetLocation, info.Effect, info.EffectPalette));
|
||||
w.Add(new IonCannon(self.Owner, info.Weapon, w, order.TargetLocation, info.Effect, info.EffectPalette, info.WeaponDelay));
|
||||
|
||||
if (info.CameraActor == null)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user