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:
Paul Chote
2013-07-21 13:42:25 +12:00
parent 29009fe3a4
commit c3f04cc32e
20 changed files with 67 additions and 96 deletions

View File

@@ -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