Add WPos.ToCPos().
This commit is contained in:
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.RA.Effects
|
||||
parachuteOffset = pai.Offset;
|
||||
|
||||
// Adjust x,y to match the target subcell
|
||||
cargo.Trait<ITeleportable>().SetPosition(cargo, new CPos(dropPosition));
|
||||
cargo.Trait<ITeleportable>().SetPosition(cargo, dropPosition.ToCPos());
|
||||
var cp = cargo.CenterPosition;
|
||||
pos = new WPos(cp.X, cp.Y, dropPosition.Z);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
var position = self.CenterPosition;
|
||||
if (position.Z > 0 && self.GetDamageState() >= info.MinDamage &&
|
||||
!self.World.FogObscures(new CPos(position)))
|
||||
!self.World.FogObscures(position.ToCPos()))
|
||||
{
|
||||
var offset = info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation));
|
||||
var pos = position + body.LocalToWorld(offset);
|
||||
|
||||
Reference in New Issue
Block a user