Actor.Info is now never null

This commit is contained in:
Chris Forbes
2010-01-14 17:51:00 +13:00
parent a3ba286b06
commit ef59f3cb05
5 changed files with 5 additions and 7 deletions

View File

@@ -62,7 +62,7 @@ namespace OpenRa.Game
{
get // todo: inline into GetBounds
{
var si = Info != null ? Info.Traits.GetOrDefault<SelectableInfo>() : null;
var si = Info.Traits.GetOrDefault<SelectableInfo>();
if (si != null && si.Bounds != null)
return new float2(si.Bounds[0], si.Bounds[1]);
@@ -100,7 +100,7 @@ namespace OpenRa.Game
public RectangleF GetBounds(bool useAltitude)
{
var si = Info != null ? Info.Traits.GetOrDefault<SelectableInfo>() : null;
var si = Info.Traits.GetOrDefault<SelectableInfo>();
var size = SelectedSize;
var loc = CenterLocation - 0.5f * size;