renamed Info to LegacyInfo, marked Obsolete. added NewUnitInfo ref as Info.
This commit is contained in:
@@ -61,7 +61,7 @@ namespace OpenRa.Game
|
||||
world = new World();
|
||||
Game.world.ActorAdded += a =>
|
||||
{
|
||||
if (a.Owner != null && a.Info != null)
|
||||
if (a.Owner != null && a.LegacyInfo != null)
|
||||
a.Owner.Shroud.Explore(a);
|
||||
};
|
||||
|
||||
@@ -310,8 +310,8 @@ namespace OpenRa.Game
|
||||
public static IEnumerable<Actor> SelectActorsInBox(float2 a, float2 b)
|
||||
{
|
||||
return FindUnits(a, b)
|
||||
.Where( x => x.Info.Selectable )
|
||||
.GroupBy(x => (x.Owner == LocalPlayer) ? x.Info.SelectionPriority : 0)
|
||||
.Where( x => x.LegacyInfo.Selectable )
|
||||
.GroupBy(x => (x.Owner == LocalPlayer) ? x.LegacyInfo.SelectionPriority : 0)
|
||||
.OrderByDescending(g => g.Key)
|
||||
.Select( g => g.AsEnumerable() )
|
||||
.DefaultIfEmpty( new Actor[] {} )
|
||||
@@ -338,7 +338,7 @@ namespace OpenRa.Game
|
||||
heuristic = loc =>
|
||||
{
|
||||
var b = Game.BuildingInfluence.GetBuildingAt(loc);
|
||||
if (b != null && b.Owner == p && (b.Info as LegacyBuildingInfo).BaseNormal) return 0;
|
||||
if (b != null && b.Owner == p && (b.LegacyInfo as LegacyBuildingInfo).BaseNormal) return 0;
|
||||
if ((loc - position).Length > maxDistance)
|
||||
return float.PositiveInfinity; /* not quite right */
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user