sight moved to Unit/Building
This commit is contained in:
@@ -33,7 +33,7 @@ namespace OpenRa.Game
|
||||
|
||||
public void Explore(Actor a)
|
||||
{
|
||||
foreach (var t in Game.FindTilesInCircle((1f / Game.CellSize * a.CenterLocation).ToInt2(), a.LegacyInfo.Sight))
|
||||
foreach (var t in Game.FindTilesInCircle((1f / Game.CellSize * a.CenterLocation).ToInt2(), a.Info.Traits.Get<OwnedActorInfo>().Sight))
|
||||
explored[t.X, t.Y] = true;
|
||||
|
||||
dirty = true;
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace OpenRa.Game.Traits
|
||||
public readonly ArmorType Armor = ArmorType.none;
|
||||
public readonly bool Crewed = false; // replace with trait?
|
||||
public readonly int InitialFacing = 128;
|
||||
public readonly int Sight = 0;
|
||||
}
|
||||
|
||||
class BuildingInfo : OwnedActorInfo, ITraitInfo
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace OpenRa.Game.Traits
|
||||
{
|
||||
class MobileInfo : ITraitInfo
|
||||
{
|
||||
public readonly int Sight = 0;
|
||||
public readonly int ROT = 0;
|
||||
public readonly int Speed = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user