Rename Bullet Angle to LaunchAngle

This commit is contained in:
reaperrr
2016-09-09 16:10:33 +02:00
parent 8ba9afdb16
commit 20cd2aa4ab
16 changed files with 38 additions and 31 deletions

View File

@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Common.Projectiles
public readonly WDist TargetExtraSearchRadius = new WDist(1536);
[Desc("Arc in WAngles, two values indicate variable arc.")]
public readonly WAngle[] Angle = { WAngle.Zero };
public readonly WAngle[] LaunchAngle = { WAngle.Zero };
[Desc("Interval in ticks between each spawned Trail animation.")]
public readonly int TrailInterval = 2;
@@ -111,10 +111,10 @@ namespace OpenRA.Mods.Common.Projectiles
var world = args.SourceActor.World;
if (info.Angle.Length > 1)
angle = new WAngle(world.SharedRandom.Next(info.Angle[0].Angle, info.Angle[1].Angle));
if (info.LaunchAngle.Length > 1)
angle = new WAngle(world.SharedRandom.Next(info.LaunchAngle[0].Angle, info.LaunchAngle[1].Angle));
else
angle = info.Angle[0];
angle = info.LaunchAngle[0];
if (info.Speed.Length > 1)
speed = new WDist(world.SharedRandom.Next(info.Speed[0].Length, info.Speed[1].Length));

View File

@@ -478,6 +478,13 @@ namespace OpenRA.Mods.Common.UtilityCommands
node.Key = "Duration";
}
// Rename Bullet Angle to LaunchAngle
if (engineVersion < 20161016)
{
if (node.Key == "Angle")
node.Key = "LaunchAngle";
}
UpgradeWeaponRules(modData, engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}