rename WDist.Range to WDist.Length
This commit is contained in:
@@ -61,12 +61,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (randomize)
|
||||
attackFacing = Util.QuantizeFacing(self.World.SharedRandom.Next(256), info.QuantizedFacings) * (256 / info.QuantizedFacings);
|
||||
|
||||
var altitude = self.World.Map.Rules.Actors[info.UnitType].Traits.Get<PlaneInfo>().CruiseAltitude.Range;
|
||||
var altitude = self.World.Map.Rules.Actors[info.UnitType].Traits.Get<PlaneInfo>().CruiseAltitude.Length;
|
||||
var attackRotation = WRot.FromFacing(attackFacing);
|
||||
var delta = new WVec(0, -1024, 0).Rotate(attackRotation);
|
||||
target = target + new WVec(0, 0, altitude);
|
||||
var startEdge = target - (self.World.Map.DistanceToEdge(target, -delta) + info.Cordon).Range * delta / 1024;
|
||||
var finishEdge = target + (self.World.Map.DistanceToEdge(target, delta) + info.Cordon).Range * delta / 1024;
|
||||
var startEdge = target - (self.World.Map.DistanceToEdge(target, -delta) + info.Cordon).Length * delta / 1024;
|
||||
var finishEdge = target + (self.World.Map.DistanceToEdge(target, delta) + info.Cordon).Length * delta / 1024;
|
||||
|
||||
Actor camera = null;
|
||||
Beacon beacon = null;
|
||||
@@ -172,7 +172,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Info.BeaconPalettePrefix,
|
||||
Info.BeaconPoster,
|
||||
Info.BeaconPosterPalette,
|
||||
() => 1 - ((distanceTestActor.CenterPosition - target).HorizontalLength - info.BeaconDistanceOffset.Range) * 1f / distance);
|
||||
() => 1 - ((distanceTestActor.CenterPosition - target).HorizontalLength - info.BeaconDistanceOffset.Length) * 1f / distance);
|
||||
|
||||
w.Add(beacon);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user