Shift Sight onto its own trait. Only cnc for now.

This commit is contained in:
Paul Chote
2010-07-28 21:37:10 +12:00
parent 8fab45ae39
commit eaa80fab74
10 changed files with 144 additions and 69 deletions

View File

@@ -23,22 +23,12 @@ namespace OpenRA.Traits
public object Create( ActorInitializer init ) { return new Unit(); }
}
public class Unit : INotifyDamage, IRadarSignature, IRevealShroud, ITick
public class Unit : INotifyDamage, IRadarSignature
{
[Sync]
public int Facing;
[Sync]
public int Altitude;
int2 previousLocation;
public void Tick(Actor self)
{
if (!self.IsIdle && previousLocation != self.Location)
{
previousLocation = self.Location;
self.World.WorldActor.traits.Get<Shroud>().UpdateActor(self);
}
}
public void Damaged(Actor self, AttackInfo e)
{