rename WRange to WDist
This commit is contained in:
@@ -23,9 +23,9 @@ namespace OpenRA.Mods.Common.Effects
|
||||
public class BulletInfo : IProjectileInfo
|
||||
{
|
||||
[Desc("Projectile speed in WRange / tick, two values indicate variable velocity.")]
|
||||
public readonly WRange[] Speed = { new WRange(17) };
|
||||
public readonly WDist[] Speed = { new WDist(17) };
|
||||
[Desc("Maximum offset at the maximum range.")]
|
||||
public readonly WRange Inaccuracy = WRange.Zero;
|
||||
public readonly WDist Inaccuracy = WDist.Zero;
|
||||
public readonly string Image = null;
|
||||
[SequenceReference("Image")] public readonly string Sequence = "idle";
|
||||
public readonly string Palette = "effect";
|
||||
@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
readonly ProjectileArgs args;
|
||||
readonly Animation anim;
|
||||
[Sync] readonly WAngle angle;
|
||||
[Sync] readonly WRange speed;
|
||||
[Sync] readonly WDist speed;
|
||||
|
||||
ContrailRenderable contrail;
|
||||
string trailPalette;
|
||||
@@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
angle = info.Angle[0];
|
||||
|
||||
if (info.Speed.Length > 1)
|
||||
speed = new WRange(world.SharedRandom.Next(info.Speed[0].Range, info.Speed[1].Range));
|
||||
speed = new WDist(world.SharedRandom.Next(info.Speed[0].Range, info.Speed[1].Range));
|
||||
else
|
||||
speed = info.Speed[0];
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ namespace OpenRA.Mods.Common.Effects
|
||||
public readonly string OpenSequence = null;
|
||||
public readonly string Palette = "effect";
|
||||
public readonly bool Shadow = false;
|
||||
public readonly WRange Velocity = WRange.Zero;
|
||||
public readonly WDist Velocity = WDist.Zero;
|
||||
[Desc("Value added to velocity every tick.")]
|
||||
public readonly WRange Acceleration = new WRange(15);
|
||||
public readonly WDist Acceleration = new WDist(15);
|
||||
|
||||
public IEffect Create(ProjectileArgs args) { return new GravityBomb(this, args); }
|
||||
}
|
||||
@@ -46,8 +46,8 @@ namespace OpenRA.Mods.Common.Effects
|
||||
this.info = info;
|
||||
this.args = args;
|
||||
pos = args.Source;
|
||||
velocity = new WVec(WRange.Zero, WRange.Zero, -info.Velocity);
|
||||
acceleration = new WVec(WRange.Zero, WRange.Zero, info.Acceleration);
|
||||
velocity = new WVec(WDist.Zero, WDist.Zero, -info.Velocity);
|
||||
acceleration = new WVec(WDist.Zero, WDist.Zero, info.Acceleration);
|
||||
|
||||
anim = new Animation(args.SourceActor.World, info.Image);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
public readonly string Palette = "effect";
|
||||
public readonly bool Shadow = false;
|
||||
[Desc("Projectile speed in WRange / tick")]
|
||||
public readonly WRange Speed = new WRange(8);
|
||||
public readonly WDist Speed = new WDist(8);
|
||||
[Desc("Maximum vertical pitch when changing altitude.")]
|
||||
public readonly WAngle MaximumPitch = WAngle.FromDegrees(30);
|
||||
[Desc("How many ticks before this missile is armed and can explode.")]
|
||||
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
[Desc("Is the missile blocked by actors with BlocksProjectiles: trait.")]
|
||||
public readonly bool Blockable = true;
|
||||
[Desc("Maximum offset at the maximum range")]
|
||||
public readonly WRange Inaccuracy = WRange.Zero;
|
||||
public readonly WDist Inaccuracy = WDist.Zero;
|
||||
[Desc("Probability of locking onto and following target.")]
|
||||
public readonly int LockOnProbability = 100;
|
||||
[Desc("In n/256 per tick.")]
|
||||
@@ -59,7 +59,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
[Desc("Explodes when inside this proximity radius to target.",
|
||||
"Note: If this value is lower than the missile speed, this check might",
|
||||
"not trigger fast enough, causing the missile to fly past the target.")]
|
||||
public readonly WRange CloseEnough = new WRange(298);
|
||||
public readonly WDist CloseEnough = new WDist(298);
|
||||
|
||||
public IEffect Create(ProjectileArgs args) { return new Missile(this, args); }
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
WPos pos;
|
||||
int ticks;
|
||||
|
||||
public NukeLaunch(Player firedBy, string weapon, WPos launchPos, WPos targetPos, WRange velocity, int delay, bool skipAscent, string flashType)
|
||||
public NukeLaunch(Player firedBy, string weapon, WPos launchPos, WPos targetPos, WDist velocity, int delay, bool skipAscent, string flashType)
|
||||
{
|
||||
this.firedBy = firedBy;
|
||||
this.weapon = weapon;
|
||||
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Effects
|
||||
this.turn = delay / 2;
|
||||
this.flashType = flashType;
|
||||
|
||||
var offset = new WVec(WRange.Zero, WRange.Zero, velocity * turn);
|
||||
var offset = new WVec(WDist.Zero, WDist.Zero, velocity * turn);
|
||||
ascendSource = launchPos;
|
||||
ascendTarget = launchPos + offset;
|
||||
descendSource = targetPos + offset;
|
||||
|
||||
Reference in New Issue
Block a user