non-turreted AutoTarget is sensible now
This commit is contained in:
@@ -106,19 +106,18 @@ namespace OpenRa.Game
|
||||
.FirstOrDefault( x => x != null );
|
||||
}
|
||||
|
||||
public RectangleF Bounds
|
||||
public RectangleF GetBounds(bool useAltitude)
|
||||
{
|
||||
get
|
||||
var size = SelectedSize;
|
||||
var loc = CenterLocation - 0.5f * size;
|
||||
|
||||
if (useAltitude)
|
||||
{
|
||||
var size = SelectedSize;
|
||||
var loc = CenterLocation - 0.5f * size;
|
||||
var unit = traits.GetOrDefault<Unit>();
|
||||
|
||||
if (unit != null)
|
||||
loc -= new float2(0, unit.Altitude);
|
||||
|
||||
return new RectangleF(loc.X, loc.Y, size.X, size.Y);
|
||||
if (unit != null) loc -= new float2(0, unit.Altitude);
|
||||
}
|
||||
|
||||
return new RectangleF(loc.X, loc.Y, size.X, size.Y);
|
||||
}
|
||||
|
||||
public bool IsDead { get { return Health <= 0; } }
|
||||
|
||||
Reference in New Issue
Block a user