Convert NukeLaunch to world coordinates.
This commit is contained in:
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
[WeaponReference]
|
||||
public readonly string MissileWeapon = "";
|
||||
public readonly int2 SpawnOffset = int2.Zero;
|
||||
public readonly WVec SpawnOffset = WVec.Zero;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new NukePower(init.self, this); }
|
||||
}
|
||||
@@ -39,10 +39,10 @@ namespace OpenRA.Mods.RA
|
||||
Sound.Play(Info.LaunchSound);
|
||||
|
||||
var npi = Info as NukePowerInfo;
|
||||
|
||||
self.Trait<RenderBuilding>().PlayCustomAnim(self, "active");
|
||||
var rb = self.Trait<RenderSimple>();
|
||||
rb.PlayCustomAnim(self, "active");
|
||||
self.World.AddFrameEndTask(w => w.Add(
|
||||
new NukeLaunch(self.Owner, self, npi.MissileWeapon, (PVecInt)npi.SpawnOffset, order.TargetLocation)));
|
||||
new NukeLaunch(self.Owner, self, npi.MissileWeapon, self.CenterPosition + rb.LocalToWorld(npi.SpawnOffset), order.TargetLocation)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user