Convert (Dynamic)FacingInit, (Dynamic)TurretFacingInit to WAngle.
This commit is contained in:
@@ -91,15 +91,15 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
base.Activate(self, order, manager);
|
||||
|
||||
SendDropPods(self, order, info.PodFacing);
|
||||
SendDropPods(self, order, WAngle.FromFacing(info.PodFacing));
|
||||
}
|
||||
|
||||
public void SendDropPods(Actor self, Order order, int podFacing)
|
||||
public void SendDropPods(Actor self, Order order, WAngle facing)
|
||||
{
|
||||
var actorInfo = self.World.Map.Rules.Actors[info.UnitTypes.First().ToLowerInvariant()];
|
||||
var aircraftInfo = actorInfo.TraitInfo<AircraftInfo>();
|
||||
var altitude = aircraftInfo.CruiseAltitude.Length;
|
||||
var approachRotation = WRot.FromFacing(podFacing);
|
||||
var approachRotation = WRot.FromYaw(facing);
|
||||
var fallsToEarthInfo = actorInfo.TraitInfo<FallsToEarthInfo>();
|
||||
var delta = new WVec(0, -altitude * aircraftInfo.Speed / fallsToEarthInfo.Velocity.Length, 0).Rotate(approachRotation);
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
{
|
||||
new CenterPositionInit(location),
|
||||
new OwnerInit(self.Owner),
|
||||
new FacingInit(podFacing)
|
||||
new FacingInit(facing)
|
||||
});
|
||||
|
||||
var aircraft = pod.Trait<Aircraft>();
|
||||
|
||||
Reference in New Issue
Block a user