Convert yaml-exposed facings to WAngle.

This commit is contained in:
Paul Chote
2020-07-09 22:08:38 +01:00
committed by reaperrr
parent 6d12301f88
commit ac975f4139
80 changed files with 477 additions and 370 deletions

View File

@@ -141,7 +141,7 @@ namespace OpenRA.Mods.Common.Traits
if (info.DeliveryAircraft != null)
{
var crate = w.CreateActor(false, crateActor, new TypeDictionary { new OwnerInit(w.WorldActor.Owner) });
var dropFacing = WAngle.FromFacing(256 * self.World.SharedRandom.Next(info.QuantizedFacings) / info.QuantizedFacings);
var dropFacing = new WAngle(1024 * self.World.SharedRandom.Next(info.QuantizedFacings) / info.QuantizedFacings);
var delta = new WVec(0, -1024, 0).Rotate(WRot.FromYaw(dropFacing));
var altitude = self.World.Map.Rules.Actors[info.DeliveryAircraft].TraitInfo<AircraftInfo>().CruiseAltitude.Length;