Remove Util.QuantizeFacing from support powers.

This commit is contained in:
Paul Chote
2016-01-14 20:52:09 +00:00
parent 3b675c9bad
commit 275be64f05
3 changed files with 3 additions and 3 deletions

View File

@@ -58,7 +58,7 @@ namespace OpenRA.Mods.Common.Traits
var info = Info as AirstrikePowerInfo;
if (randomize)
attackFacing = Util.QuantizeFacing(self.World.SharedRandom.Next(256), info.QuantizedFacings) * (256 / info.QuantizedFacings);
attackFacing = 256 * self.World.SharedRandom.Next(info.QuantizedFacings) / info.QuantizedFacings;
var altitude = self.World.Map.Rules.Actors[info.UnitType].TraitInfo<AircraftInfo>().CruiseAltitude.Length;
var attackRotation = WRot.FromFacing(attackFacing);

View File

@@ -108,7 +108,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 = Util.QuantizeFacing(self.World.SharedRandom.Next(256), info.QuantizedFacings) * (256 / info.QuantizedFacings);
var dropFacing = 256 * self.World.SharedRandom.Next(info.QuantizedFacings) / info.QuantizedFacings;
var delta = new WVec(0, -1024, 0).Rotate(WRot.FromFacing(dropFacing));
var altitude = self.World.Map.Rules.Actors[info.DeliveryAircraft].TraitInfo<AircraftInfo>().CruiseAltitude.Length;

View File

@@ -70,7 +70,7 @@ namespace OpenRA.Mods.RA.Traits
var info = Info as ParatroopersPowerInfo;
if (randomize)
dropFacing = Util.QuantizeFacing(self.World.SharedRandom.Next(256), info.QuantizedFacings) * (256 / info.QuantizedFacings);
dropFacing = 256 * self.World.SharedRandom.Next(info.QuantizedFacings) / info.QuantizedFacings;
var altitude = self.World.Map.Rules.Actors[info.UnitType].TraitInfo<AircraftInfo>().CruiseAltitude.Length;
var dropRotation = WRot.FromFacing(dropFacing);