Convert non-aircraft positioning to world coords.
This removes the incomplete and unused hover code on Mobile, which would be more trouble that it is currently worth to carry over.
This commit is contained in:
@@ -97,9 +97,9 @@ namespace OpenRA.Mods.RA.Effects
|
||||
// In pixels
|
||||
var dist = Args.target.CenterLocation + offset - PxPosition;
|
||||
|
||||
var targetAltitude = 0;
|
||||
if (Args.target.IsValid && Args.target.IsActor && Args.target.Actor.HasTrait<IOccupySpace>())
|
||||
targetAltitude = Args.target.Actor.Trait<IOccupySpace>().Altitude;
|
||||
var targetAltitude = 0;
|
||||
if (Args.target.IsValid)
|
||||
targetAltitude = Args.target.CenterPosition.Z * Game.CellSize / 1024;
|
||||
|
||||
var jammed = Info.Jammable && world.ActorsWithTrait<JamsMissiles>().Any(tp =>
|
||||
(tp.Actor.CenterLocation - PxPosition).ToCVec().Length <= tp.Trait.Range
|
||||
|
||||
Reference in New Issue
Block a user