fix various breakage in nuke code
This commit is contained in:
@@ -26,27 +26,22 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Effects
|
||||
{
|
||||
class NukeInfo : IProjectileInfo
|
||||
{
|
||||
public readonly string Image = null;
|
||||
public IEffect Create(ProjectileArgs args) { return null; }
|
||||
}
|
||||
|
||||
class NukeLaunch : IEffect
|
||||
{
|
||||
readonly Actor silo;
|
||||
Animation anim;
|
||||
float2 pos;
|
||||
int2 targetLocation;
|
||||
readonly int targetAltitude = 400;
|
||||
int altitude;
|
||||
bool goingUp = true;
|
||||
string weapon;
|
||||
|
||||
public NukeLaunch(Actor silo, string weapon, int2 targetLocation)
|
||||
{
|
||||
this.silo = silo;
|
||||
this.targetLocation = targetLocation;
|
||||
anim = new Animation("nuke");
|
||||
this.weapon = weapon;
|
||||
anim = new Animation(weapon);
|
||||
anim.PlayRepeating("up");
|
||||
|
||||
if (silo == null)
|
||||
@@ -61,7 +56,6 @@ namespace OpenRA.Mods.RA.Effects
|
||||
void StartDescent(World world)
|
||||
{
|
||||
pos = OpenRA.Traits.Util.CenterOfCell(targetLocation);
|
||||
anim = new Animation("nuke");
|
||||
anim.PlayRepeating("down");
|
||||
goingUp = false;
|
||||
}
|
||||
@@ -93,7 +87,7 @@ namespace OpenRA.Mods.RA.Effects
|
||||
void Explode(World world)
|
||||
{
|
||||
world.AddFrameEndTask(w => w.Remove(this));
|
||||
Combat.DoExplosion(silo.Owner.PlayerActor, "Atomic", pos.ToInt2(), 0);
|
||||
Combat.DoExplosion(silo.Owner.PlayerActor, weapon, pos.ToInt2(), 0);
|
||||
world.WorldActor.traits.Get<ScreenShaker>().AddEffect(20, pos, 5);
|
||||
}
|
||||
|
||||
|
||||
@@ -936,4 +936,8 @@
|
||||
<unit name="rank">
|
||||
<sequence name="rank" start="0" length="4" />
|
||||
</unit>
|
||||
<unit name="atomic">
|
||||
<sequence name="up" start="0" length="4" src="atomicup" />
|
||||
<sequence name="down" start="0" length="4" src="atomicdn" />
|
||||
</unit>
|
||||
</sequences>
|
||||
@@ -619,8 +619,6 @@ SCUD:
|
||||
Damage: 600
|
||||
|
||||
Atomic:
|
||||
Nuke:
|
||||
Image: Nuke
|
||||
Warhead@impact:
|
||||
Damage: 1000
|
||||
Spread: 6
|
||||
|
||||
Reference in New Issue
Block a user